Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
}
if (stdout) {
console.log(stdout);
}
}
if (err) {
return reject(err);
}
return resolve();
};
args.push(cb);
exec.apply(exec, args);
}.bind(this));
}
var argv = [].slice.call(arguments),
_env = JSON.parse(JSON.stringify(process.env));
if (argv.length === 2) {
argv = [ argv[0] ].concat({ cwd: dirPath }).concat(argv[1]);
}
else {
argv[1].cwd = argv[1].cwd
? path.join(dirPath, argv[1].cwd)
: dirPath
;
}
argv[1].env = _env;
return exec.apply(exec, argv);
};