bunny icon indicating copy to clipboard operation
bunny copied to clipboard

Wrong command line resolution of array output when multiple input types are specified

Open bogdang989 opened this issue 8 years ago • 1 comments

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"

bogdang989 avatar Jul 06 '17 09:07 bogdang989

test_array.zip If only the prefix: -in for array elements is deleted, the command line is built properly.

bogdang989 avatar Jul 18 '17 10:07 bogdang989