Skip to content

Commit 438ebe4

Browse files
illusionalmr-c
authored andcommitted
Allow specification of file object in sec expression
/issues/1232
1 parent 1e5ad10 commit 438ebe4

File tree

1 file changed

+7
-6
lines changed

1 file changed

+7
-6
lines changed

cwltool/builder.py

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -390,6 +390,13 @@ def _capture_files(f): # type: (Dict[str, str]) -> Dict[str, str]
390390
if not sfname:
391391
continue
392392
found = False
393+
394+
if isinstance(sfname, str):
395+
sf_location = datum["location"][0:datum["location"].rindex("/")+1]+sfname
396+
else:
397+
sf_location = sfname["location"]
398+
sfname = sfname["basename"]
399+
393400
for d in datum["secondaryFiles"]:
394401
if not d.get("basename"):
395402
d["basename"] = d["location"][
@@ -398,12 +405,6 @@ def _capture_files(f): # type: (Dict[str, str]) -> Dict[str, str]
398405
if d["basename"] == sfname:
399406
found = True
400407
if not found:
401-
sf_location = (
402-
datum["location"][
403-
0 : datum["location"].rindex("/") + 1
404-
]
405-
+ sfname
406-
)
407408
if isinstance(sfname, MutableMapping):
408409
datum["secondaryFiles"].append(sfname)
409410
elif discover_secondaryFiles and self.fs_access.exists(

0 commit comments

Comments
 (0)