Changed exec to only wrap spawn
This commit is contained in:
parent
d77e3f8844
commit
1a9ced0bb8
@ -3,18 +3,11 @@ const logger = require("./logger.js")("exec");
|
||||
const { spawn } = require("child_process");
|
||||
|
||||
|
||||
function exec(cmd, stdout, stderr, exit_handler){
|
||||
const [bin, ...args] = cmd.split(' ')
|
||||
function exec(cmd, options){
|
||||
|
||||
logger.addContext("binary", "bin");
|
||||
logger.debug(`Spawn process '${cmd}'`);
|
||||
let proc = spawn(bin, args);
|
||||
|
||||
return {
|
||||
"process": proc,
|
||||
"stdout": proc.stdout,
|
||||
"stderr": proc.stderr
|
||||
}
|
||||
return spawn(bin, args, options);
|
||||
}
|
||||
|
||||
// Specify exports
|
||||
|
Loading…
x
Reference in New Issue
Block a user