A command that has finished executing.
Contains the exit code of the command.
The exit code of the command, if available. This is set after wait has returned.
ID of the command execution.
string
Iterate over the output of this command.
AsyncIterable
<{
stream
: "stdout"
| "stderr"
;
data
: string
;
}, any
, any
>
An async iterable of log entries from the command output.
Command.stdout, Command.stderr, and Command.output to access output as a string.
Wait for a command to exit and populate its exit code.
Promise
<CommandFinished
>
A CommandFinished instance with populated exit code.
Get the output of stdout
, stderr
, or both as a string.
NOTE: This may throw string conversion errors if the command does not output valid Unicode.
Parameter | Type | Default value | Description |
---|---|---|---|
stream | "stdout" | "stderr" | "both" | "both" | The output stream to read: “stdout”, “stderr”, or “both”. |
Promise
<string
>
The output of the specified stream(s) as a string.
Get the output of stdout
as a string.
NOTE: This may throw string conversion errors if the command does not output valid Unicode.
Promise
<string
>
The standard output of the command.
Get the output of stderr
as a string.
NOTE: This may throw string conversion errors if the command does not output valid Unicode.
Promise
<string
>
The standard error output of the command.
Kill a running command in a sandbox.
Parameter | Type |
---|---|
signal? | Signal |
Promise
<void
>
Promise<void>
.