jsii-release
Version:
Release jsii modules to multiple package managers
42 lines (41 loc) • 999 B
TypeScript
/**
* Options for the `run` function.
*/
export interface RunOptions {
/**
* Wokring directory.
*
* @default process.cwd()
*/
readonly cwd?: string;
/**
* Capture the output of the command and return to caller.
*
* @default - no capture, output is printed to stdout.
*/
readonly capture?: boolean;
/**
* Run the command inside a shell.
*
* @default false
*/
readonly shell?: boolean;
/**
* Properties to add to 'env'
*/
readonly modEnv?: Record<string, string>;
}
/**
* Run a shell command and return the output.
* Throws if the command fails.
*
* @param command command (e.g 'git commit -m')
*/
export declare function run(command: string, options?: RunOptions): string;
/**
* Return the path under which a program is available.
* Empty string if the program is not installed.
*
* @param program program to check (e.g 'git')
*/
export declare function which(program: string): string;