Rush StackShopBlogEvents
Skip to main content

Home > @microsoft/rush-lib > IOperationRunnerContext > runWithTerminalAsync

IOperationRunnerContext.runWithTerminalAsync() method

This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.

Invokes the specified callback with a terminal that is associated with this operation.

Will write to a log file corresponding to the phase and project, and clean it up upon completion.

Signature:

runWithTerminalAsync<T>(callback: (terminal: ITerminal, terminalProvider: ITerminalProvider) => Promise<T>, options: {
createLogFile: boolean;
logFileSuffix?: string;
}): Promise<T>;

Parameters

Parameter

Type

Description

callback

(terminal: ITerminal, terminalProvider: ITerminalProvider) => Promise<T>

options

{ createLogFile: boolean; logFileSuffix?: string; }

Returns:

Promise<T>