chore(release): drop the unused synchronous runner

This commit is contained in:
imccyu
2026-08-26 13:23:41 +08:00
parent f18ab429e4
commit b342b09401
-13
View File
@@ -70,19 +70,6 @@ export function capture(command: string, args: readonly string[], options: RunOp
return result.stdout.trim()
}
/**
* Run a command with inherited streams, so its progress reaches the log, and
* fail on a non-zero exit.
* @param command - executable name.
* @param args - command arguments.
* @param options - working directory and environment.
*/
export function run(command: string, args: readonly string[], options: RunOptions = {}): void {
const result = spawnSync(command, [...args], { cwd: options.cwd, env: options.env, stdio: 'inherit' })
if (result.error !== undefined) throw result.error
if (result.status !== 0) throw new Error(`${command} ${args.join(' ')} exited with ${String(result.status)}`)
}
/**
* Run a command with inherited streams without blocking the event loop, so a
* caller can hold several commands in flight, and fail on a non-zero exit.