Skip to content

Commit 49c9404

Browse files
wspearCopilot
andauthored
Update e4s_cl/cli/commands/__execute.py
Co-authored-by: Copilot <[email protected]>
1 parent 4e65247 commit 49c9404

File tree

1 file changed

+13
-6
lines changed

1 file changed

+13
-6
lines changed

e4s_cl/cli/commands/__execute.py

Lines changed: 13 additions & 6 deletions
Original file line numberDiff line numberDiff 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

0 commit comments

Comments
 (0)