import { SpawnOptions } from 'node:child_process'; /** result of {@link exec} */ export interface ExecResult { /** stdout of the command */ stdout: string; /** stderr of the command */ stderr: string; /** exit code of the command */ exitCode: number; } export declare class ExecError extends Error { readonly cmd: string[]; readonly result: ExecResult; constructor(cmd: string[], result: ExecResult); } /** * execute a command and return its result * * **differences from node's `child_process.exec()`**: * - if `options.stdio` is set to `'inherit'`, the command will be printed to the console (unless `options.quiet` is set to `true`) * - on non-zero exit code, the promise will be rejected with an {@link ExecError} if `options.throwOnError` is set to `true` * * @param cmd command to execute (first element is the command itself, the rest are arguments to it) */ export declare function exec(cmd: string[], options?: SpawnOptions & { throwOnError?: boolean; quiet?: boolean; }): Promise;