Skip to content

Commit df66457

Browse files
author
Anton Khodak
committed
Do not add anything to command line if input array is empty
1 parent 0866dad commit df66457

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

cwltool/builder.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -215,12 +215,12 @@ def generate_arg(self, binding): # type: (Dict[Text,Any]) -> List[Text]
215215

216216
l = [] # type: List[Dict[Text,Text]]
217217
if isinstance(value, list):
218-
if binding.get("itemSeparator"):
218+
if binding.get("itemSeparator") and value:
219219
l = [binding["itemSeparator"].join([self.tostr(v) for v in value])]
220220
elif binding.get("valueFrom"):
221221
value = [self.tostr(v) for v in value]
222222
return ([prefix] if prefix else []) + value
223-
elif prefix:
223+
elif prefix and value:
224224
return [prefix]
225225
else:
226226
return []

0 commit comments

Comments
 (0)