exec: don't output error msg when exit code > 0

This commit is contained in:
Artur Adib 2013-09-11 18:50:25 -04:00
parent b932ad1f18
commit 8df40dcf10
2 changed files with 3 additions and 2 deletions

View File

@ -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);

View File

@ -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 = {