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

shellCommand #44

Open
tetron opened this issue Jul 18, 2024 · 0 comments
Open

shellCommand #44

tetron opened this issue Jul 18, 2024 · 0 comments

Comments

@tetron
Copy link
Member

tetron commented Jul 18, 2024

Split out from #33 because it is a bit more complicated.

ShellCommandRequirement

Becomes "shellCommand" on CommandLineTool with value 'true' or 'false' (default is 'false') but with different semantics than "ShellCommandRequirement".

Having "shellCommand: true" (or "useShell: true" or whatever we call it) specifies semantics so that

  • it is run with /bin/sh -c
  • the command line is constructed such that each component is added to the command line separated by spaces and but any parameter substitutions are quoted. Quoting parameter substitutions can be suppressed using 'shellQuote: false', but I think in most cases this won't be necessary (and presents the opportunity for shell injection, so it should be strongly discouraged).

This differs from ShellCommandRequirement where each element of the command line is quoted by default unless 'shellQuote: false' is present, which makes it very awkward to use shell metacharacters even when it is safe to do so.

@tetron tetron changed the title useShell shellCommand Jul 18, 2024
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

1 participant