exec-back
Execute commands and receive the output via callback. It uses cross-spawn-async
behind the scenes to keep things safe and cross-platform.
Install
$ npm install exec-back
Usage
var exec =
cmd
is the only required argument and all can be specified in any order. opts
will be directly passed through to cross-spawn-async
.
Rather than providing them with every exec
call, you can bind the opts
object at the outset:
var exec = var bound =
Errors
The err
parameter will always be null
unless the process returned an non-zero exit code. The buffered output of of stdout
and stderr
will always be provided, regardless of erroneous exit codes.