Skip to main content
interface Deno.SpawnOptions
Unstable

Properties

optional
args: string[]

Arguments to pass to the process.

optional
cwd: string | URL

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

optional
clearEnv: boolean

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.

optional
env: Record<string, string>

Environmental variables to pass to the subprocess.

optional
uid: number

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.

optional
gid: number

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

optional
signal: AbortSignal

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

optional
stdin: "piped" | "inherit" | "null"

Defaults to "null".

optional
stdout: "piped" | "inherit" | "null"

Defaults to "piped".

optional
stderr: "piped" | "inherit" | "null"

Defaults to "piped".