Created
September 14, 2022 21:57
-
-
Save cb1kenobi/d9e8013c69aba6d293e2fbc3cce2b57c to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function spawn(command, args, options) { | |
// Parse the arguments | |
const parsed = parse(command, args, options); | |
// Spawn the child process | |
const spawned = cp.spawn(parsed.command, parsed.args, parsed.options); | |
// Hook into child process "exit" event to emit an error if the command | |
// does not exists, see: https://github.com/IndigoUnited/node-cross-spawn/issues/16 | |
enoent.hookChildProcess(spawned, parsed); | |
return spawned; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment