Ende.CommandOptions
interface
interface Ende.CommandOptionsOptions which can be set when calling Ende.Command.
Properties
args
args?: string[]Arguments to pass to the process.
cwd
cwd?: string | URLThe working directory of the process.
If not specified, the cwd of the parent process is used.
clearEnv
clearEnv?: booleanClear environmental variables from parent process.
Doesn't guarantee that only env variables are present, as the OS may
set environmental variables for processes.
Default: false
env
env?: Record<string, string>Environmental variables to pass to the subprocess.
uid
uid?: numberSets 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
gid?: numberSimilar to uid, but sets the group ID of the child process.
signal
signal?: AbortSignalAn AbortSignal that allows closing the process using the
corresponding AbortController by sending the process a
SIGTERM signal.
Not supported in Ende.Command.outputSync.
stdin
stdin?: "piped" | "inherit" | "null"How stdin of the spawned process should be handled.
Defaults to "inherit" for output & outputSync,
and "inherit" for spawn.
stdout
stdout?: "piped" | "inherit" | "null"How stdout of the spawned process should be handled.
Defaults to "piped" for output & outputSync,
and "inherit" for spawn.
stderr
stderr?: "piped" | "inherit" | "null"How stderr of the spawned process should be handled.
Defaults to "piped" for output & outputSync,
and "inherit" for spawn.
windowsRawArguments
windowsRawArguments?: booleanSkips quoting and escaping of the arguments on windows. This option is ignored on non-windows platforms.
Default: false
detached
detached?: booleanWhether to detach the spawned process from the current process. This allows the spawned process to continue running after the current process exits.
Note: In order to allow the current process to exit, you need to ensure
you call unref() on the child process.
In addition, the stdio streams – if inherited or piped – may keep the current process from exiting until the streams are closed.
Default: false