Skip to main content

Function: exec()

exec(command, args?, options?): Promise<RunResult>

Defined in: packages/extension-api/src/extension-api.d.ts:4708

Executes the provided command and returns an object containing the exit code, stdout, and stderr content.

Parameters​

command​

string

The command to execute.

args?​

string[]

The command arguments.

options?​

RunOptions

Options, such as environment variables.

Returns​

Promise<RunResult>

A promise that resolves to a RunResult object.

Throws​

RunError if provided command can not be executed.