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

Shell command requirement #329

Open
wants to merge 6 commits into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions src/faq.md
Original file line number Diff line number Diff line change
Expand Up @@ -446,6 +446,16 @@ The reference runner and several other CWL implementations support running
those Docker format containers using the Singularity engine. Directly
specifying a Singularity format container is not part of the CWL standards.

## Shell Command Requirement
`ShellCommandRequirement` in CWL is used to convert a list of arguments into a string containing a shell command line.
Each item in the argument list must be joined into a string separated by single spaces and quoted to prevent intepretation by the shell, unless `CommandLineBinding` for that argument contains `shellQuote: false`.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If you're going to copy text from the specification, you have to at least reword it so it is speaking to the right audience.

The specification is speaking to people who are writing code to run CWL. So when it says "it must do something" it is saying their CWL runner must do this.

For the audience of CWL users, you want to say what will happen. So this needs to be change to say "...each item will be joined..."


If `shellQuote: false` is specified, the argument is joined into the command string without quoting, which allows the use of shell metacharacters such as `|` for pipes.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Needs example.

`ShellCommandRequirement` in CWL allows us to use `/bin/sh -c` in order to pass our command as a string to a shell intrepreter. `ShellQuote:false` leaves shell metacharacters unquoted, and thus they can still be interpreted and used by a shell.

To use the `ShellCommandRequirement`, you need to pass in the class name `ShellCommandRequirement` as a string.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Needs example.



## Debug JavaScript expressions

You can use the <code>--js-console</code> option of <code>cwltool</code>, or you can try
Expand Down