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

Can't return 0 for optional int/float output

Open
#1,121 0 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
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

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.