Skip to content

Commit

Permalink
[fix] Improve error output
Browse files Browse the repository at this point in the history
  • Loading branch information
julianduque committed Nov 29, 2013
1 parent 20e7dbc commit 17109d0
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions lib/jitsu.js
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -365,6 +365,19 @@ jitsu.showError = function (command, err, shallow, skip) {
jitsu.log.error(err.result.message); jitsu.log.error(err.result.message);
} }


if (err.result.error) {
if (~err.result.error.indexOf('matching versions')) {
jitsu.log.error(err.result.error);
jitsu.log.error("Do not use a specific engine version, try a generic one (eg: 0.8.x or 0.10.x)");
}
else if (~err.result.error.indexOf('npm exited')) {
jitsu.log.error(err.result.error);
jitsu.log.error("npm installation failed, please double check your package.json dependencies");
} else {
jitsu.log.error(err.result.error);
}
}

if (err.result.errors && Array.isArray(err.result.errors)) { if (err.result.errors && Array.isArray(err.result.errors)) {
errors = { errors = {
connection: err.result.errors.filter(function (err) { connection: err.result.errors.filter(function (err) {
Expand Down

0 comments on commit 17109d0

Please sign in to comment.