Skip to content

Do not add anything to command line if input array is empty #634

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

Merged
merged 2 commits into from
Feb 24, 2018
Merged
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
4 changes: 2 additions & 2 deletions cwltool/builder.py
Original file line number Diff line number Diff line change
Expand Up @@ -215,12 +215,12 @@ def generate_arg(self, binding): # type: (Dict[Text,Any]) -> List[Text]

l = [] # type: List[Dict[Text,Text]]
if isinstance(value, list):
if binding.get("itemSeparator"):
if binding.get("itemSeparator") and value:
l = [binding["itemSeparator"].join([self.tostr(v) for v in value])]
elif binding.get("valueFrom"):
value = [self.tostr(v) for v in value]
return ([prefix] if prefix else []) + value
elif prefix:
elif prefix and value:
return [prefix]
else:
return []
Expand Down