Skip to content

Commit b2771a6

Browse files
committed
All tests passed
1 parent 5f212b6 commit b2771a6

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

cwl_utils/etools_to_clt.py

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -964,6 +964,21 @@ def traverse_step(step: cwl.WorkflowStep, parent: cwl.Workflow, replace_etool=Fa
964964
source_type = cwl.InputParameter(None, None, None, None, None, None, None, None, cwl.ArraySchema(target.type, 'array'))
965965
else:
966966
input_source_id = inp.source.split('#')[-1]
967+
if isinstance(step.run, cwl.ExpressionTool):
968+
found_JSReq = False
969+
reqs = []
970+
if step.run.hints:
971+
reqs.extend(step.run.hints)
972+
if step.run.requirements:
973+
reqs.extend(step.run.requirements)
974+
for req in reqs:
975+
if isinstance(req, cwl.InlineJavaScriptRequirement):
976+
found_JSReq = True
977+
if not found_JSReq:
978+
if not step.run.requirements:
979+
step.run.requirements = []
980+
expr_lib = find_expressionLib([parent])
981+
step.run.requirements.append(cwl.InlineJavascriptRequirement(expr_lib))
967982
replace_expr_with_etool(
968983
inp.valueFrom,
969984
etool_id,

0 commit comments

Comments
 (0)