We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 20d66e0 commit 12f0c8aCopy full SHA for 12f0c8a
wdlgen/task.py
@@ -109,7 +109,8 @@ def get_string(self):
109
print("separate_array take preferences over: separator, default, true, false")
110
if self.optional:
111
# Ugly optional workaround: https://github.com/openwdl/wdl/issues/25#issuecomment-315424063
112
- internal_pref = f'if defined({name}) then "{bc}" else ""'
+ # Additional workaround for 'length(select_first({name}, [])' as length requires a non-optional array
113
+ internal_pref = f'if defined({name}) && length(select_first([{name}, []])) > 0 then "{bc}" else ""'
114
return f'~{{{internal_pref}}}~{{sep=" {bc}" {name}}}'
115
return f'~{{sep=" " prefix("{bc}", {name})}}'
116
0 commit comments