Extends
Properties
exitCode
Overrides
Command
.exitCode
Accessors
cmdId
Get Signature
Returns
string
Inherited from
Command
.cmdId
cwd
Get Signature
Returns
string
Inherited from
Command
.cwd
startedAt
Get Signature
Returns
number
Inherited from
Command
.startedAt
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.Inherited from
Command
.logs
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.
Inherited from
Command
.output
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.
Inherited from
Command
.stdout
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.
Inherited from
Command
.stderr
kill()
Parameters
Parameter | Type |
---|---|
signal? | Signal |
Returns
Promise
<void
>
Promise<void>
.
Inherited from
Command
.kill
wait()
Returns
Promise
<CommandFinished
>
This CommandFinished instance.
Deprecated
This method is redundant for CommandFinished instances. The exitCode is already available.Overrides
Command
.wait