-
-
Notifications
You must be signed in to change notification settings - Fork 68
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
base: main
Are you sure you want to change the base?
Shell command requirement #329
Conversation
I forgot to merge my branches locally and the commit from my previous branch got into this one. Please let me know if I should delete the branch and re-commit or not. |
@@ -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`. |
There was a problem hiding this comment.
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. | ||
`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. |
There was a problem hiding this comment.
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 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`. | ||
|
||
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. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Needs example.
fixes #159