HTTP and scripting actions / Action reference
Run shell command
Manual / Actions / HTTP and scripting
Run a shell command.
Read Shared action rules for disabling this action, outputs, error routing, and recovery.
Configuration and behavior
| Parameter | Default | Notes |
|---|---|---|
| Shell | Command Prompt | Windows only: Command Prompt or Windows PowerShell 5.1. macOS and Ubuntu show no Shell field and always run /bin/sh. |
| Command * | - | Long commands wrap visually without adding line breaks to the saved command. Press Enter to add a real command line break, and drag the editor's bottom edge to make more room. Variables are quoted for the shell automatically; do not add quotes around them. Append ` |
| Time limit | 5m |
Go duration (30s, 5m, 1h). On expiry the whole process tree is killed and the step fails. |
Outputs: stdout, stderr, exit_code (32 KiB per stream, then truncated). Exit code 0 is success; anything else takes the error port with ${error.shell.kind} = exit and ${error.shell.stdout}, ${error.shell.stderr}, ${error.shell.exit_code}. Other kinds: configuration, start, timeout.
The command runs as the Relay service account, non-interactively, and with a fixed minimal environment: PATH is exactly /usr/bin:/bin:/usr/sbin:/sbin, plus TMPDIR and, where Relay can work it out, HOME. Nothing else is passed in. It is not your login shell's PATH or profile, and it is not the service's own environment either, so a variable set for the service does not reach the command. Call tools by absolute path if they live anywhere else. On Windows the environment is an allowlist (machine PATH and system locations), the exit code follows $LASTEXITCODE, and Command Prompt refuses values containing ", %, !, line breaks, or a trailing backslash.