Skip to content

Commit

Permalink
Improve error message while reading the json.
Browse files Browse the repository at this point in the history
  • Loading branch information
satazor committed Dec 3, 2012
1 parent f9f3ee1 commit 88843bf
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion lib/core/package.js
Expand Up @@ -277,7 +277,10 @@ Package.prototype.loadJSON = function () {
}

readJSON(jsonFile, function (err, json) {
if (err) return this.emit('error', err);
if (err) {
err.details = 'There was an error while reading the ' + config.json;
return this.emit('error', err);
}

this.json = json;
this.version = this.commit || json.commit || json.version;
Expand Down

0 comments on commit 88843bf

Please sign in to comment.