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

$5 in the baseCommand nor the arguments list should be evaluated #701

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
22 changes: 22 additions & 0 deletions v1.0/conformance_test_v1.0.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1593,3 +1593,25 @@
inputs are not present in the input object used to run the tool.
should_fail: true
tags: [ required ]

- tool: v1.0/awk-awk.cwl
job: v1.0/awk-awk-job.yaml
doc: test that a $ in the baseCommand is not interpreted by the shell
output:
bRegionsNonZero:
basename: awk-awk-input_nonZero.txt
class: File
checksum: "sha1$810037850eb6f1791e9365e25f124808828070e2"
size: 24
tags: [ required ]

- tool: v1.0/awk-awk2.cwl
job: v1.0/awk-awk-job.yaml
doc: test that a $ in an argument is not interpreted by the shell
output:
bRegionsNonZero:
basename: awk-awk-input_nonZero.txt
class: File
checksum: "sha1$810037850eb6f1791e9365e25f124808828070e2"
size: 24
tags: [ required ]
2 changes: 2 additions & 0 deletions v1.0/v1.0/awk-awk-input
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
this will be ignored 0
this will be selected 1
3 changes: 3 additions & 0 deletions v1.0/v1.0/awk-awk-job.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
atoBComparison:
class: File
path: awk-awk-input
13 changes: 13 additions & 0 deletions v1.0/v1.0/awk-awk.cwl
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
#!/usr/bin/env cwl-runner
cwlVersion: v1.0
class: CommandLineTool
inputs:
atoBComparison:
type: File
inputBinding:
position: 1
outputs:
bRegionsNonZero:
type: stdout
stdout: $(inputs.atoBComparison.basename)_nonZero.txt
baseCommand: [awk, "$5!=0"]
14 changes: 14 additions & 0 deletions v1.0/v1.0/awk-awk2.cwl
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
#!/usr/bin/env cwl-runner
cwlVersion: v1.0
class: CommandLineTool
inputs:
atoBComparison:
type: File
inputBinding:
position: 1
outputs:
bRegionsNonZero:
type: stdout
stdout: $(inputs.atoBComparison.basename)_nonZero.txt
baseCommand: awk
arguments: ["$5!=0"]