Skip to content

Commit

Permalink
Do not reset listingn in workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
stxue1 committed Nov 7, 2024
1 parent f71dc86 commit 15de587
Showing 1 changed file with 10 additions and 6 deletions.
16 changes: 10 additions & 6 deletions src/toil/cwl/cwltoil.py
Original file line number Diff line number Diff line change
Expand Up @@ -4142,12 +4142,16 @@ def main(args: Optional[list[str]] = None, stdout: TextIO = sys.stdout) -> int:
# ToilFsAccess needs to be set up if we want to be able to use
# URLs.
builder = tool._init_job(initialized_job_order, runtime_context)

# make sure this doesn't add listing items; if shallow_listing is
# selected, it will discover dirs one deep and then again later on
# (probably when the cwltool builder gets ahold of the job in the
# CWL job's run()), producing 2+ deep listings instead of only 1.
builder.loadListing = "no_listing"
if not isinstance(tool, cwltool.workflow.Workflow):
# make sure this doesn't add listing items; if shallow_listing is
# selected, it will discover dirs one deep and then again later on
# (when the cwltool builder gets constructed from the job in the
# CommandLineTool's job() method,
# see https://github.com/common-workflow-language/cwltool/blob/9cda157cb4380e9d30dec29f0452c56d0c10d064/cwltool/command_line_tool.py#L951),
# producing 2+ deep listings instead of only 1.
# ExpressionTool also uses a builder, see https://github.com/common-workflow-language/cwltool/blob/9cda157cb4380e9d30dec29f0452c56d0c10d064/cwltool/command_line_tool.py#L207
# Workflows don't need this because they don't go through CommandLineTool or ExpressionTool
builder.loadListing = "no_listing"

builder.bind_input(
tool.inputs_record_schema,
Expand Down

0 comments on commit 15de587

Please sign in to comment.