Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Glob with brace expression not working #870

Closed
bogdang989 opened this issue Aug 16, 2018 · 3 comments
Closed

Glob with brace expression not working #870

bogdang989 opened this issue Aug 16, 2018 · 3 comments

Comments

@bogdang989
Copy link
Member

bogdang989 commented Aug 16, 2018

Expected Behavior

glob: {*.txt,*.png} should match all of the braced patterns.

Actual Behavior

Nothing is returned.

Workflow Code

class: CommandLineTool
cwlVersion: v1.0
baseCommand:
  - ls
inputs:
  - id: input
    type: string?
outputs:
  - id: output
    type: File[]
    outputBinding:
      glob: '{*.png,*.txt}'
requirements:
  - class: DockerRequirement
    dockerPull: 'ubuntu:16.04'
  - class: InitialWorkDirRequirement
    listing:
      - entryname: a.txt
        entry: a
      - entryname: b.png
        entry: b
stdout: b.txt

Your Environment

  • cwltool version: 1.0.20180721142728
@mr-c
Copy link
Member

mr-c commented Aug 16, 2018

Brace expression isn't part of the POSIX glob syntax, that is a BASH-ism.

For this example, here's a working version:

class: CommandLineTool
cwlVersion: v1.0
baseCommand:
  - ls
inputs:
  - id: input
    type: string?
outputs:
  - id: output
    type: File[]
    outputBinding:
      glob: 
        - *.png
        - *.txt
requirements:
  - class: DockerRequirement
    dockerPull: 'ubuntu:16.04'
  - class: InitialWorkDirRequirement
    listing:
      - entryname: a.txt
        entry: a
      - entryname: b.png
        entry: b
stdout: c.txt

Or with an inline YAML list: glob: [ *.png, *. txt ]

@bogdang989
Copy link
Member Author

Tnx @mr-c for the clarification. I guess I should close the linked PR as well then?

@tetron
Copy link
Member

tetron commented Aug 16, 2018

Yes

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants