Skip to content

Function: spawnSync()

spawnSync(…args): ExecResult

Spawn a subprocess synchronously and wait for exit.

Unlike spawn, stdio options are limited to "inherit", "pipe", "ignore", and "capture" — no per-line callbacks.

SpawnArgs<SyncExecOptions>

Arguments passed verbatim to the executable

ExecResult

Exit code, captured line arrays, and trimmed stdout / stderr getters

When spawn fails for a reason other than a missing executable, or check is true and exit code is non-zero