common-workflow-language / common-workflow-language/cwltool
Can't return 0 for optional int/float output
- Dominant language
- Python
- Stars
- 376
- Forks
- 255
- Avg merge
- 2d 7h
- Merged PRs (30d)
- 12
Description
## Expected Behavior
Tool output should be 0
## Actual Behavior
Tool output is none
## Workflow Code
```
cwlVersion: v1.0
class: CommandLineTool
baseCommand:
- echo
- "0"
stdout: a.txt
requirements:
- class: InlineJavascriptRequirement
inputs: []
outputs:
idx:
type: float?
outputBinding:
glob: "a.txt"
loadContents: true
outputEval: "${\n return parseFloat(self[0].contents);\n}"
```
## Full Traceback
```pytb
completed success
{
"idx": null
}
Final process status is success
```
## Your Environment
* cwltool version: 1.0.20190228155703
Check using ``cwltool --version``
Contributor guide
Assessment
This issue has not been assessed yet.