See
Sandbox.runCommand to start a command.Extended by
Properties
exitCode
Accessors
cmdId
Get Signature
Returns
string
cwd
Get Signature
Returns
string
startedAt
Get Signature
Returns
number
Methods
logs()
Parameters
Parameter | Type | Description |
---|---|---|
opts? | { signal? : AbortSignal ; } | Optional parameters. |
opts.signal? | AbortSignal | An AbortSignal to cancel log streaming. |
Returns
AsyncGenerator
<{
stream
: "stdout"
| "stderr"
;
data
: string
;
}, void
, void
> & Disposable
& {
close
: void
;
}
An async iterable of log entries from the command output.
See
Command.stdout, Command.stderr, and Command.output to access output as a string.wait()
Returns
Promise
<CommandFinished
>
A CommandFinished instance with populated exit code.
output()
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.
stdout()
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.
stderr()
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.
kill()
Parameters
Parameter | Type |
---|---|
signal? | Signal |
Returns
Promise
<void
>
Promise<void>
.