Skip to content

ExecOptions

Options for executing a command.

Import:

import type { ExecOptions } from 'obsidian-dev-utils/script-utils/exec';

Signature:

export interface ExecOptions

Properties

PropertyTypeDescription
cwd?stringA current working folder for the command execution.
env?NodeJS.ProcessEnvAdditional environment variables for the child process, merged over the inherited environment.
isInteractive?booleanIf true, attaches the child process's stdio directly to the terminal (stdio: 'inherit') instead of capturing it. Use for long-running or interactive commands such as dev servers and watch mode. Because the output is not captured, the resolved stdout is an empty string.
isQuiet?booleanIf true, suppresses the output of the command.
shouldFailIfCalledFromOutsideRoot?booleanIf true, throws an error if the command fails.
shouldIgnoreExitCode?booleanIf true, ignores the exit code of the command.
shouldIncludeDetails?booleanIf false, only returns the output of the command.
stdin?stringAn input to be passed to the command.

Links to this page: