Skip to content

Commit

Permalink
Visit all steps
Browse files Browse the repository at this point in the history
  • Loading branch information
stxue1 committed Dec 5, 2024
1 parent fc23fe5 commit ae5dfae
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/toil/cwl/cwltoil.py
Original file line number Diff line number Diff line change
Expand Up @@ -3805,13 +3805,14 @@ def visitSteps(
"""
if isinstance(cmdline_tool, cwltool.workflow.Workflow):
# For workflows we need to dispatch on steps
ret = []
for step in cmdline_tool.steps:
# Handle the step's tool
ret = op(step.tool)
ret.extend(op(step.tool))
# Recures on the embedded tool; maybe it's a workflow.
recurse_ret = visitSteps(step.embedded_tool, op)
ret.extend(recurse_ret)
return ret
return ret
elif isinstance(cmdline_tool, cwltool.process.Process):
# All CWL Process objects (including CommandLineTool) will have tools
# if they bothered to run the Process __init__.
Expand Down

0 comments on commit ae5dfae

Please sign in to comment.