Skip to main content
Deno 2 is finally here 🎉️
Learn more
Module

x/ayonli_jsext/lib.deno.d.ts>Deno.CommandOptions

A JavaScript extension package for building strong and modern applications.
Latest
interface Deno.CommandOptions
import { type Deno } from "https://deno.land/x/ayonli_jsext@v0.9.72/lib.deno.d.ts";
const { CommandOptions } = Deno;

Options which can be set when calling Deno.Command.

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 = false

Clear environmental variables from parent process.

Doesn't guarantee that only 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 set uid 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 Deno.Command.outputSync.

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

How stdin of the spawned process should be handled.

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

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

How stdout of the spawned process should be handled.

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

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

How stderr of the spawned process should be handled.

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

optional
windowsRawArguments: boolean = false

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