deno.com

interface Deno.CommandOptions

Options which can be set when calling Deno.Command.

Properties #

#args: string[]
optional

Arguments to pass to the process.

#cwd: string | URL
optional

The working directory of the process.

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

#clearEnv: boolean = false
optional

Clear environmental variables from parent process.

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

#env: Record<string, string>
optional

Environmental variables to pass to the subprocess.

#uid: number
optional

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

#gid: number
optional

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

#signal: AbortSignal
optional

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

Not supported in Deno.Command.outputSync.

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

How stdin of the spawned process should be handled.

Defaults to "inherit" for output & outputSync, and "inherit" for spawn.

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

How stdout of the spawned process should be handled.

Defaults to "piped" for output & outputSync, and "inherit" for spawn.

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

How stderr of the spawned process should be handled.

Defaults to "piped" for output & outputSync, and "inherit" for spawn.

#windowsRawArguments: boolean = false
optional

Skips quoting and escaping of the arguments on windows. This option is ignored on non-windows platforms.