common-workflow-language / common-workflow-language/cwltool

Separate fails when File[] is given

Open
#1,337 4 comments 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
376
Forks
255
Avg merge
2d 7h
Merged PRs (30d)
12

Description

## Expected Behavior
When using separate false I expect that arguments are not separated. This works for string, int, file but not for File[] when calling the workflow.

## Actual Behavior

## Workflow Code
```
#!/usr/bin/env cwl-runner
cwlVersion: v1.2
class: CommandLineTool

inputs:
one:
type: File[]
inputBinding:
prefix: 'one='
separate: false
two:
type: string
default: "2"
inputBinding:
prefix: 'two='
separate: false

outputs:
out:
type: stdout
stdout: sep_stdout.txt

baseCommand: [echo]
```

Corresponding workflow

```
#!/usr/bin/env cwl-runner
cwlVersion: v1.2
class: Workflow

requirements:
- class: StepInputExpressionRequirement

inputs:
one:
type: File[]

steps:
separate:
run: ./separate.cwl
in:
one: one
out: [out]

outputs:
separate:
type: File
outputSource: separate/out
```

## Full Traceback
```pytb
INFO /usr/local/bin/cwltool 3.0.20200807132242
INFO Resolved 'sep_workflow.cwl' to 'file:///Users/bla/sep_workflow.cwl'
sep_workflow.cwl:13:3: object id `sep_workflow.cwl#separate` previously defined
INFO [workflow ] start
INFO [workflow ] starting step separate
INFO [step separate] start
INFO [job separate] /private/tmp/docker_tmpz8fq2oe_$ echo \
one= \
/private/var/folders/7s/1n66vsfj1c93hm09w2xz747c0000gn/T/tmpo6gw9fki/stg86055357-807a-4835-bfc5-bcab8d69392f/test.txt \
two=2 > /private/tmp/docker_tmpz8fq2oe_/sep_stdout.txt
INFO [job separate] completed success
INFO [step separate] completed success
INFO [workflow ] completed success
{
"separate": {
"location": "file:///Users/bla/sep_stdout.txt",
"basename": "sep_stdout.txt",
"class": "File",
"checksum": "sha1$1238c7933e251d901017ed8a030f2c4c6d03e612",
"size": 129,
"path": "/Users/bla/sep_stdout.txt"
}
}
INFO Final process status is success```

There is now a space after `one=`

## Your Environment
* cwltool version: 3.0.20200807132242
Check using ``cwltool --version``

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.