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.
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.
Param: command
Command string (shell) or argv array (shell-off supported).
Param: shell
Shell setting: false for plain execution, true for the OS default shell (
powershell.exeon Windows,/bin/bashelsewhere), or a shell path. An argv array is quoted for that shell.Param: opts
Execution options (cwd/env/stdio).
Returns
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.