Skip to content

Commit 2352d16

Browse files
authored
Fix secondaryFiles in array (#211)
* Fix secondaryFiles in array * Propagate 'format' and 'streamable' along with 'secondaryFiles'.
1 parent 3b7ec6c commit 2352d16

File tree

1 file changed

+11
-3
lines changed

1 file changed

+11
-3
lines changed

cwltool/builder.py

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,9 @@ def bind_input(self, schema, datum, lead_pos=[], tail_pos=[]):
6767
st = copy.deepcopy(schema["type"])
6868
if binding and "inputBinding" not in st and st["type"] == "array" and "itemSeparator" not in binding:
6969
st["inputBinding"] = {}
70+
for k in ("secondaryFiles", "format", "streamable"):
71+
if k in schema:
72+
st[k] = schema[k]
7073
bindings.extend(self.bind_input(st, datum, lead_pos=lead_pos, tail_pos=tail_pos))
7174
else:
7275
if schema["type"] in self.schemaDefs:
@@ -85,10 +88,15 @@ def bind_input(self, schema, datum, lead_pos=[], tail_pos=[]):
8588
if binding:
8689
b2 = copy.deepcopy(binding)
8790
b2["datum"] = item
91+
itemschema = {
92+
u"type": schema["items"],
93+
u"inputBinding": b2
94+
}
95+
for k in ("secondaryFiles", "format", "streamable"):
96+
if k in schema:
97+
itemschema[k] = schema[k]
8898
bindings.extend(
89-
self.bind_input(
90-
{"type": schema["items"], "inputBinding": b2},
91-
item, lead_pos=n, tail_pos=tail_pos))
99+
self.bind_input(itemschema, item, lead_pos=n, tail_pos=tail_pos))
92100
binding = None
93101

94102
if schema["type"] == "File":

0 commit comments

Comments
 (0)