Files
bower/lib/util/childProcess.js
2021-11-15 03:58:38 +01:00

22 lines
449 B
JavaScript

var childProcess = require('child_process');
var which = require('./which');
function execFile(cmd, args, opt, cb) {
try {
cmd = which.sync(cmd);
} catch (e) {
cb(e);
}
return childProcess.execFile(cmd, args, opt, cb);
}
function spawn(cmd, args, opt) {
cmd = which.sync(cmd);
return childProcess.spawn(cmd, args, opt);
}
module.exports = {
execFile: execFile,
spawn: spawn
};