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");
|
const { spawn } = require("child_process");
|
||||||
|
|
||||||
|
|
||||||
function exec(cmd, stdout, stderr, exit_handler){
|
function exec(cmd, options){
|
||||||
const [bin, ...args] = cmd.split(' ')
|
|
||||||
|
|
||||||
logger.addContext("binary", "bin");
|
logger.addContext("binary", "bin");
|
||||||
logger.debug(`Spawn process '${cmd}'`);
|
logger.debug(`Spawn process '${cmd}'`);
|
||||||
let proc = spawn(bin, args);
|
return spawn(bin, args, options);
|
||||||
|
|
||||||
return {
|
|
||||||
"process": proc,
|
|
||||||
"stdout": proc.stdout,
|
|
||||||
"stderr": proc.stderr
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Specify exports
|
// Specify exports
|
||||||
|
Loading…
x
Reference in New Issue
Block a user