hart exec
Run a command in the workspace
Generated from
cmd/hart at v1.5.0Runs a command with bash in /data/app of the workspace's IDE pod, with the workspace's env vars and your Git identity, as a terminal would. With one argument it is a shell command line (quote it to use pipes or &&); with several, every argument is passed as it is.
The command gets --timeout seconds (default 120, at most 300) and 1 MiB of output per stream; the process
is killed after that. For longer jobs use a stage (hart prepare, hart test) or a service. The command's
standard output and error are printed on stdout and stderr, and hart exits with its exit status (124
when the timeout killed it, 137 when it was killed otherwise).
hart exec [flags] -- COMMAND [ARG...]Examples:
hart exec -- npm run migrate
hart exec -- 'ls -l | head -3'| Flag | Description |
|---|---|
--timeout int | seconds before the process is killed (1 to 300) (default 120) |