File tree Expand file tree Collapse file tree 1 file changed +13
-6
lines changed
Expand file tree Collapse file tree 1 file changed +13
-6
lines changed Original file line number Diff line number Diff line change @@ -467,13 +467,20 @@ def main(self, argv):
467467 parts = path .split (':' )
468468 if len (parts ) == 2 :
469469 source , dest = parts
470-
471- if dest and _check_access (source ):
472- container .bind_file (source , dest = dest , option = FileOptions .READ_WRITE )
473- elif _check_access (path ):
474- container .bind_file (path , option = FileOptions .READ_WRITE )
470+ else :
471+ LOGGER .error ("Invalid file binding specification '%s'. Expected 'source:dest'." , path )
472+ continue
473+
474+ if dest is not None :
475+ if _check_access (source ):
476+ container .bind_file (source , dest = dest , option = FileOptions .READ_WRITE )
477+ else :
478+ LOGGER .error ("File '%s' not found." , source )
475479 else :
476- LOGGER .error ("File '%s' not found." , source )
480+ if _check_access (path ):
481+ container .bind_file (path , option = FileOptions .READ_WRITE )
482+ else :
483+ LOGGER .error ("File '%s' not found." , path )
477484
478485 # This script is sourced before any other command in the container
479486 params .source_script_path = args .source
You can’t perform that action at this time.
0 commit comments