Add shell.execSync

This commit is contained in:
Girish Ramakrishnan
2016-05-24 10:19:00 -07:00
parent c1a2444dfa
commit d71d09c1ba
2 changed files with 24 additions and 1 deletions
+9 -1
View File
@@ -2,7 +2,8 @@
exports = module.exports = {
sudo: sudo,
exec: exec
exec: exec,
execSync: execSync
};
var assert = require('assert'),
@@ -13,6 +14,13 @@ var assert = require('assert'),
var SUDO = '/usr/bin/sudo';
function execSync(tag, cmd) {
assert.strictEqual(typeof tag, 'string');
assert.strictEqual(typeof cmd, 'string');
child_process.execSync(cmd, { stdio: 'inherit' });
}
function exec(tag, file, args, callback) {
assert.strictEqual(typeof tag, 'string');
assert.strictEqual(typeof file, 'string');