This commit is contained in:
2025-12-02 05:02:21 -08:00
parent 4361f29319
commit f89280f292
11 changed files with 384 additions and 129 deletions
+10
View File
@@ -0,0 +1,10 @@
import { type SpawnSyncOptions, spawnSync as nodeSpawnSync } from 'node:child_process'
export default function spawnSync(command: string, args?: readonly string[], options: SpawnSyncOptions = {}) {
if (!options.stdio) options.stdio = 'inherit' // I wanna know what's going on
if (!options.shell) options.shell = true // Windows requires this for PATHEXT support
const result = nodeSpawnSync(command, args, options)
if (result.error) throw result.error // Don't silently fail
if (result.status !== 0) process.exit(result.status) // Don't continue if a command fails
return result
}