common-workflow-language / common-workflow-language/cwltool
itemSeparator with an array prints arguments twice
- Dominant language
- Python
- Stars
- 376
- Forks
- 255
- Avg merge
- 2d 7h
- Merged PRs (30d)
- 12
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 https://github.com/common-workflow-language/cwltool/blob/78f62710b7add5148b89db7c104d8f8ce46413f5/cwltool/builder.py#L292 is generating values as well as `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
Contributor guide
Assessment
This issue has not been assessed yet.