diff --git a/src/cli.ts b/src/cli.ts index d48b4c6..4104350 100644 --- a/src/cli.ts +++ b/src/cli.ts @@ -1,21 +1,4 @@ -import { ChildProcess, SpawnSyncOptionsWithBufferEncoding, SpawnSyncReturns, spawnSync as rawSpawnSync } from "child_process"; - -export function check(result: SpawnSyncReturns) { - if (result.error) - throw result.error; - if (result.status !== 0) { - throw result.stderr; - } - return result; -} - -export function checkedSpawnSync( - command: string, - args: readonly string[], - options: SpawnSyncOptionsWithBufferEncoding, -): SpawnSyncReturns { - return check(rawSpawnSync(command, args, options)); -} +import { ChildProcess } from "child_process"; export function promisifySpawn(p: T) { return new Promise((resolve, reject) => {