bunny
bunny copied to clipboard
Wrong command line resolution of array output when multiple input types are specified
Input expression is defined like this(ignore the '#'):
input_files:
type:
- File
# - type: array
# items: File
# inputBinding:
# prefix: -in
inputBinding:
position: 2
valueFrom: |
${
if ( Object.prototype.toString.call(inputs.input_files) === '[object Array]'){
return null;
} else {
return ["-in", inputs.input_files.path];
}
}
When a single file is received, command line gets "-in -in -in"
When the part marked with '#' is removed, command line gets the proper thing "-in /path/to/file"
test_array.zip If only the prefix: -in for array elements is deleted, the command line is built properly.