Skip to content

execFromRoot

Executes a command from the root folder of the project.

Import:

import { execFromRoot } from 'obsidian-dev-utils/script-utils/root';

Signature:

function execFromRoot(command: string | CommandPart[], options: ExecOptions): Promise<string | ExecResult>

Parameters:

ParameterTypeDescription
commandstring | CommandPart[]The command to execute. It can be a string or an array of strings.
optionsExecOptionsThe options for the execution.

Returns: Promise<string | ExecResult> — A Promise that resolves with the output of the command or an ExecResult object. The ExecResult object contains the exit code, exit signal, stderr, and stdout.


Links to this page: