startProcess
startProcess(
command,args?,options?):Promise<SpawnedProcess<SpawnedProcessEvents>>
Defined in: packages/node/src/process/start-process.ts:67
Spawns a command and resolves once it is running.
Nothing in args can be interpreted as a command unless shell is set, so
the default form is safe with untrusted arguments.
Parameters
Section titled “Parameters”command
Section titled “command”string
The executable to run.
readonly string[]
Arguments passed to it verbatim.
options?
Section titled “options?”Streams, environment, cancellation. See StartProcessOptions.
Returns
Section titled “Returns”Promise<SpawnedProcess<SpawnedProcessEvents>>
A handle over the running child.
Example
Section titled “Example” await using child = await startProcess("tail", ["-f", "app.log"]); child.subscribe("output", (_stream, line) => console.log(line)); ```;
## Throws
When the command cannot be spawned.