diff --git a/src/common.js b/src/common.js index 950125f..fe20871 100644 --- a/src/common.js +++ b/src/common.js @@ -31,7 +31,8 @@ function error(msg, _continue) { state.error = ''; state.error += state.currentCmd + ': ' + msg + '\n'; - log(state.error); + if (msg.length > 0) + log(state.error); if (config.fatal) process.exit(1); diff --git a/src/exec.js b/src/exec.js index beb4e0e..7ccdbc0 100644 --- a/src/exec.js +++ b/src/exec.js @@ -84,7 +84,7 @@ function execSync(cmd, opts) { // some shell return codes are defined as errors, per http://tldp.org/LDP/abs/html/exitcodes.html if (code === 1 || code === 2 || code >= 126) { - common.error('Exec returned error code' + code, true); + common.error('', true); // unix/shell doesn't really give an error message after non-zero exit codes } // True if successful, false if not var obj = {