Open
Description
Inputs
test.cwl:
cwlVersion: v1.0
class: CommandLineTool
baseCommand: ['true']
inputs:
- id: param
type:
type: array
items: string
inputBinding:
prefix: --arr_prefix
inputBinding:
prefix: --before_prefix
itemSeparator: " "
outputs: []
Output
$ python -m cwltool test.cwl --param one --param two
/Users/th10/checkouts/cwltool/cwltool/__main__.py 1.0.20180509130025
Resolved 'test.cwl' to 'file:///Users/th10/checkouts/cwltool/test.cwl'
[job test.cwl] /private/tmp/docker_tmpq_xbceae$ true \
--before_prefix \
'one two' \
--arr_prefix \
one \
--arr_prefix \
two
[job test.cwl] completed success
{}
Final process status is success
It looks like
Line 292 in 78f6271
bind_input
splitting up the list and feeding each part into bind_input
, hence the generation of the interpolated value of one two
twice.
Your Environment
- cwltool version: 1.0.20170816094652
Activity
kinow commentedon May 19, 2022
Same output with the latest version of
cwltool
and usingv1.0
orv1.2
.I think the
type
element is aCommandInputRecordSchema
, and itsinputBinding
is tellingcwltool
to add the values of that parameter to the command line.If the idea was to add
one two
to both--arr_prefix
and to--before_prefix
(i.e. re-use the same values), I think it would be simpler to create two inputs like this.But I am not sure what's the expected behavior.
tom-tan commentedon May 19, 2022
It is a matter of the specification as well as the implementation.
Related: common-workflow-language/cwl-v1.2#177