Skip to content

Commit 2b3d7cc

Browse files
authored
Merge branch 'master' into issues/5152-fix-bug-in-coordination-dir-override
2 parents 9d72672 + 74eaf4b commit 2b3d7cc

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

src/toil/cwl/cwltoil.py

+10
Original file line numberDiff line numberDiff line change
@@ -4186,6 +4186,16 @@ def main(args: Optional[list[str]] = None, stdout: TextIO = sys.stdout) -> int:
41864186
# ToilFsAccess needs to be set up if we want to be able to use
41874187
# URLs.
41884188
builder = tool._init_job(initialized_job_order, runtime_context)
4189+
if not isinstance(tool, cwltool.workflow.Workflow):
4190+
# make sure this doesn't add listing items; if shallow_listing is
4191+
# selected, it will discover dirs one deep and then again later on
4192+
# (when the cwltool builder gets constructed from the job in the
4193+
# CommandLineTool's job() method,
4194+
# see https://github.com/common-workflow-language/cwltool/blob/9cda157cb4380e9d30dec29f0452c56d0c10d064/cwltool/command_line_tool.py#L951),
4195+
# producing 2+ deep listings instead of only 1.
4196+
# ExpressionTool also uses a builder, see https://github.com/common-workflow-language/cwltool/blob/9cda157cb4380e9d30dec29f0452c56d0c10d064/cwltool/command_line_tool.py#L207
4197+
# Workflows don't need this because they don't go through CommandLineTool or ExpressionTool
4198+
builder.loadListing = "no_listing"
41894199

41904200
# make sure this doesn't add listing items; if shallow_listing is
41914201
# selected, it will discover dirs one deep and then again later on

0 commit comments

Comments
 (0)