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

Need better error message when type: File, but the glob returns many matches

Open
#1,160 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
```
ERROR [job bad_glob_error.cwl] Job error:
Error collecting output for parameter 'several':
bad_glob_error.cwl:6:3: Multiple matches for output item that is a single file.
If multiple outputs are desired, change the type from "File" to "File[]"
```

## Actual Behavior
```
$ cwltool bad_glob_error.cwl
INFO /home/michael/cwltool/env3.7/bin/cwltool 1.0.20190727153242
INFO Resolved 'bad_glob_error.cwl' to 'file:///home/michael/cwltool/bad_glob_error.cwl'
INFO [job bad_glob_error.cwl] /tmp/946rzqej$ touch \
a \
b \
c
ERROR [job bad_glob_error.cwl] Job error:
Error collecting output for parameter 'several':
bad_glob_error.cwl:6:3: Multiple matches for output item that is a single file.
WARNING [job bad_glob_error.cwl] completed permanentFail
{}
WARNING Final process status is permanentFail
```

## Workflow Code
``` cwl
cwlVersion: v1.0
class: CommandLineTool
inputs: []
baseCommand: [ touch, a, b, c ]
outputs:
several:
type: File # Whoops!
outputBinding:
glob: "*"
```

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.