mirror of
https://github.com/bower/bower.git
synced 2026-04-24 03:00:19 -04:00
Improve error message while reading the json.
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user