Skip to content

shellCommand #44

@tetron

Description

@tetron

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions