Skip to content

Commit c6ca713

Browse files
author
Nissan Pow
committed
fix: split resume bash expansions so empty steps-to-rerun doesn't break CLI
When METAFLOW_RESUME_STEPS_TO_RERUN is empty, the single ${VAR:+...} expansion produced '--resume-steps-to-rerun' with no value, causing Click to exit with code 2. Split into two separate expansions so --resume-steps-to-rerun only appears when the value is non-empty.
1 parent 35a3ba7 commit c6ca713

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

metaflow/plugins/aws/step_functions/step_functions.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1072,7 +1072,8 @@ def _step_cli(self, node, paths, code_package_url, user_code_retries):
10721072
step_cmd = " ".join(entrypoint + top_level + step)
10731073
resume_opts = (
10741074
"${METAFLOW_RESUME_ORIGIN_RUN_ID:+"
1075-
"--resume-origin-run-id $METAFLOW_RESUME_ORIGIN_RUN_ID "
1075+
"--resume-origin-run-id $METAFLOW_RESUME_ORIGIN_RUN_ID}"
1076+
" ${METAFLOW_RESUME_STEPS_TO_RERUN:+"
10761077
"--resume-steps-to-rerun $METAFLOW_RESUME_STEPS_TO_RERUN}"
10771078
)
10781079
cmds.append("%s %s" % (step_cmd, resume_opts))

0 commit comments

Comments
 (0)