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