@karmaniverous/get-dotenv
    Preparing search index...

    Function runCommand

    Execute a command and return its exit code.

    Command string (shell) or argv array (shell-off supported).

    Shell setting: false for plain execution, true for the OS default shell (powershell.exe on Windows, /bin/bash elsewhere), or a shell path. An argv array is quoted for that shell.

    Execution options (cwd/env/stdio).

    A promise resolving to the process exit code. When the child never ran, Error: <message> is written to stderr and the code is 127 for ENOENT, else 1.

    • Execute a command and return its exit code.

      Parameters

      • command: readonly string[]

        Command string (shell) or argv array (shell-off supported).

      • shell: false

        Shell setting: false for plain execution, true for the OS default shell (powershell.exe on Windows, /bin/bash elsewhere), or a shell path. An argv array is quoted for that shell.

      • opts: RunCommandOptions

        Execution options (cwd/env/stdio).

      Returns Promise<number>

      A promise resolving to the process exit code. When the child never ran, Error: <message> is written to stderr and the code is 127 for ENOENT, else 1.

    • Execute a command and return its exit code.

      Parameters

      • command: string | readonly string[]

        Command string (shell) or argv array (shell-off supported).

      • shell: string | boolean | URL

        Shell setting: false for plain execution, true for the OS default shell (powershell.exe on Windows, /bin/bash elsewhere), or a shell path. An argv array is quoted for that shell.

      • opts: RunCommandOptions

        Execution options (cwd/env/stdio).

      Returns Promise<number>

      A promise resolving to the process exit code. When the child never ran, Error: <message> is written to stderr and the code is 127 for ENOENT, else 1.