File tree Expand file tree Collapse file tree 1 file changed +8
-8
lines changed Expand file tree Collapse file tree 1 file changed +8
-8
lines changed Original file line number Diff line number Diff line change @@ -304,22 +304,22 @@ def _validate_step_command(
304
304
# and can be launched. If it is False then the returned str contains an
305
305
# error message.
306
306
#
307
- # Remember that variables can exist in (ascending order of priority): -
307
+ # Remember that variables can exist in the specification too.
308
+ # So, the full set of step variables (in ascending order of priority)
309
+ # is...
310
+ #
308
311
# 1. The specification
309
312
# 2. The workflow
310
- # 2 . The RunningWorkflow
313
+ # 3 . The RunningWorkflow
311
314
312
- all_variables : dict [str , Any ] = {}
313
- if "variables" in step_spec :
314
- all_variables = step_spec .pop ("variables" )
315
+ all_variables = step_spec .pop ("variables" ) if "variables" in step_spec else {}
315
316
if workflow_variables :
316
- all_variables = all_variables | workflow_variables
317
+ all_variables |= workflow_variables
317
318
if running_workflow_variables :
318
- all_variables = all_variables | running_workflow_variables
319
+ all_variables |= running_workflow_variables
319
320
message , success = decode (
320
321
job ["command" ], all_variables , "command" , TextEncoding .JINJA2_3_0
321
322
)
322
-
323
323
return all_variables if success else message
324
324
325
325
def _launch (
You can’t perform that action at this time.
0 commit comments