Skip to content

spawnProcess

spawnProcess(command, args?, options?): Promise<ProcessResult>

Defined in: packages/node/src/process/spawn-process.ts:46

Runs a command to completion and returns what it printed.

The one-shot form of startProcess: no handle is exposed, so streaming consumers pass onOutput instead of subscribing.

string

The executable to run.

readonly string[]

Arguments passed to it verbatim.

SpawnProcessOptions

Capture limits and everything StartProcessOptions accepts.

Promise<ProcessResult>

The exit status and the captured streams.

On a non-zero exit, unless throwOnNonZero is false.

When either stream exceeds maxBuffer.