Skip to content

when secondaryFiles is in an array, pass to each item #91

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 7 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 7 additions & 2 deletions cwltool/builder.py
Original file line number Diff line number Diff line change
Expand Up @@ -96,8 +96,13 @@ def bind_input(self, schema, datum, lead_pos=[], tail_pos=[]):
if binding:
b2 = copy.deepcopy(binding)
b2["valueFrom"] = item
bindings.extend(self.bind_input({"type": schema["items"], "inputBinding": b2},
item, lead_pos=n, tail_pos=tail_pos))
if "secondaryFiles" in schema:
bindings.extend(self.bind_input({"type": schema["items"], "inputBinding": b2,
"secondaryFiles" : schema["secondaryFiles"]},
item, lead_pos=n, tail_pos=tail_pos))
else:
bindings.extend(self.bind_input({"type": schema["items"], "inputBinding": b2},
item, lead_pos=n, tail_pos=tail_pos))
binding = None

if schema["type"] == "File":
Expand Down
2 changes: 1 addition & 1 deletion cwltool/job.py
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,7 @@ def linkoutdir(src, tgt):
# the container)
for _, item in self.pathmapper.items():
if src == item.resolved:
os.symlink(item.target, tgt)
os.symlink(src, tgt)
break
stageFiles(generatemapper, linkoutdir)

Expand Down
2 changes: 1 addition & 1 deletion cwltool/process.py
Original file line number Diff line number Diff line change
Expand Up @@ -420,7 +420,7 @@ def _init_job(self, joborder, **kwargs):
raise WorkflowException("Document has DockerRequirement under 'requirements' but use_container is false. DockerRequirement must be under 'hints' or use_container must be true.")

if dockerReq and kwargs.get("use_container"):
builder.outdir = kwargs.get("docker_outdir") or "/var/spool/cwl"
builder.outdir = kwargs.get("outdir") or "/var/spool/cwl"
builder.tmpdir = kwargs.get("docker_tmpdir") or "/tmp"
builder.stagedir = kwargs.get("docker_stagedir") or "/var/lib/cwl"
else:
Expand Down