2021-08-26 22:04:42 +08:00
|
|
|
import { ExecOptions, ExecOutput, ExecListeners } from './interfaces';
|
|
|
|
export { ExecOptions, ExecOutput, ExecListeners };
|
2021-02-08 12:58:32 +08:00
|
|
|
/**
|
|
|
|
* Exec a command.
|
|
|
|
* Output will be streamed to the live console.
|
|
|
|
* Returns promise with return code
|
|
|
|
*
|
|
|
|
* @param commandLine command to execute (can include additional args). Must be correctly escaped.
|
|
|
|
* @param args optional arguments for tool. Escaping is handled by the lib.
|
|
|
|
* @param options optional exec options. See ExecOptions
|
|
|
|
* @returns Promise<number> exit code
|
|
|
|
*/
|
|
|
|
export declare function exec(commandLine: string, args?: string[], options?: ExecOptions): Promise<number>;
|
2021-08-26 22:04:42 +08:00
|
|
|
/**
|
|
|
|
* Exec a command and get the output.
|
|
|
|
* Output will be streamed to the live console.
|
|
|
|
* Returns promise with the exit code and collected stdout and stderr
|
|
|
|
*
|
|
|
|
* @param commandLine command to execute (can include additional args). Must be correctly escaped.
|
|
|
|
* @param args optional arguments for tool. Escaping is handled by the lib.
|
|
|
|
* @param options optional exec options. See ExecOptions
|
|
|
|
* @returns Promise<ExecOutput> exit code, stdout, and stderr
|
|
|
|
*/
|
|
|
|
export declare function getExecOutput(commandLine: string, args?: string[], options?: ExecOptions): Promise<ExecOutput>;
|