Added lib string-argv to extract bin and args from cmd
This commit is contained in:
@@ -1,9 +1,11 @@
|
||||
const logger = require("./logger.js")("exec");
|
||||
|
||||
const { spawn } = require("child_process");
|
||||
const { parseArgsStringToArgv } = require('string-argv');
|
||||
|
||||
|
||||
function exec(cmd, options){
|
||||
const [bin, ...args] = parseArgsStringToArgv(cmd);
|
||||
|
||||
logger.addContext("binary", "bin");
|
||||
logger.debug(`Spawn process '${cmd}'`);
|
||||
|
||||
Reference in New Issue
Block a user