Comparing version 1.0.0 to 1.0.1
// Generated by CoffeeScript 1.10.0 | ||
var error, parse, spawnSync; | ||
var logError, parse, spawnSync; | ||
@@ -8,6 +8,6 @@ spawnSync = require('child_process').spawnSync; | ||
error = require('./utils').error; | ||
logError = (require('./utils')).error; | ||
module.exports = function(cmd, opts, cb) { | ||
var args, output, pid, ref, ref1, signal, status, stderr, stdout; | ||
var args, error, output, pid, ref, ref1, signal, status, stderr, stdout; | ||
ref = parse(cmd, opts), cmd = ref[0], args = ref[1], opts = ref[2]; | ||
@@ -20,13 +20,15 @@ opts.stdio = [0, 'pipe', 'pipe']; | ||
} | ||
if (typeof err !== "undefined" && err !== null) { | ||
if (typeof err !== "undefined" && err !== null) { | ||
error(err); | ||
if (error != null) { | ||
error.code = status; | ||
error.signal = signal; | ||
error.pid = pid; | ||
error.stdout = stdout; | ||
error.stderr = stderr; | ||
if (error != null) { | ||
logError(error); | ||
} | ||
err.code = status; | ||
err.signal = signal; | ||
err.pid = pid; | ||
} | ||
return cb(err, stdout, stderr); | ||
return cb(error, stdout, stderr); | ||
}; | ||
//# sourceMappingURL=execSync.js.map |
@@ -13,3 +13,3 @@ // Generated by CoffeeScript 1.10.0 | ||
module.exports = function(cmds, opts, cb) { | ||
var executor, flow, ref2; | ||
var err, executor, flow, out, ref2; | ||
if (isString(cmds)) { | ||
@@ -38,2 +38,17 @@ cmds = cmds.split('\n'); | ||
} | ||
if (opts.sync) { | ||
out = ''; | ||
err = ''; | ||
flow(executor, cmds, opts, function(err, stdout, stderr) { | ||
if (err != null) { | ||
throw err; | ||
} | ||
out = stdout; | ||
return err = stderr; | ||
}); | ||
return { | ||
stdout: out, | ||
stderr: err | ||
}; | ||
} | ||
return new Promise(function(resolve, reject) { | ||
@@ -40,0 +55,0 @@ return flow(executor, cmds, opts, function(err, stdout, stderr) { |
{ | ||
"name": "executive", | ||
"version": "1.0.0", | ||
"version": "1.0.1", | ||
"description": "Elegant command execution.", | ||
@@ -5,0 +5,0 @@ "main": "lib/", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
13959
300
2