Deno.SpawnOptions

UNSTABLE: New API, yet to be vetted.

interface SpawnOptions {
args?: string[];
clearEnv?: boolean;
cwd?: string | URL;
env?: Record<string, string>;
gid?: number;
signal?: AbortSignal;
stderr?: "piped" | "inherit" | "null";
stdin?: "piped" | "inherit" | "null";
stdout?: "piped" | "inherit" | "null";
uid?: number;
}

§Properties

§
args?: string[]
[src]

Arguments to pass to the process.

§
clearEnv?: boolean
[src]

Clear environmental variables from parent process. Doesn't guarantee that only opt.env variables are present, as the OS may set environmental variables for processes.

§
cwd?: string | URL
[src]

The working directory of the process. If not specified, the cwd of the parent process is used.

§
env?: Record<string, string>
[src]

Environmental variables to pass to the subprocess.

§
gid?: number
[src]

Similar to uid, but sets the group ID of the child process.

§
signal?: AbortSignal
[src]

An AbortSignal that allows closing the process using the corresponding AbortController by sending the process a SIGTERM signal. Not supported in spawnSync.

§
stderr?: "piped" | "inherit" | "null"
[src]

Defaults to "piped".

§
stdin?: "piped" | "inherit" | "null"
[src]

Defaults to "null".

§
stdout?: "piped" | "inherit" | "null"
[src]

Defaults to "piped".

§
uid?: number
[src]

Sets the child process’s user ID. This translates to a setuid call in the child process. Failure in the setuid call will cause the spawn to fail.