Skip to content

Commit

Permalink
fix(shell): don't reject promise on stderr
Browse files Browse the repository at this point in the history
fixes #26
  • Loading branch information
JamieMason committed Apr 6, 2016
1 parent ebe75e5 commit cc5e55e
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions src/exec.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,9 @@ module.exports = executeShellScript;

function executeShellScript (command) {
return when.promise(function (resolve, reject, notify) {
exec(command, function onExec (err, stdout, stderr) {
exec(command, function onExec (err, stdout) {
if (err) {
reject(err);
} else if (stderr) {
reject(err);
} else {
resolve(stdout.trim());
}
Expand Down

0 comments on commit cc5e55e

Please sign in to comment.