Fix bug with -f option, add compatibility with repos that do not have tags.

This fixes the fact that if a repo do not have tags, install/update wouldn't fetch new commits.
This commit is contained in:
André Cruz
2012-10-14 15:54:26 +01:00
parent 5dbb6d6346
commit cb2cb7ea75
2 changed files with 50 additions and 21 deletions

View File

@@ -91,8 +91,8 @@ Manager.prototype.loadJSON = function () {
fs.readFile(json, 'utf8', function (err, json) {
if (err) return this.emit('error', err);
this.json = JSON.parse(json);
this.name = this.json.name;
this.version = this.json.version;
this.version = json.version;
if (!this.name) this.name = json.name;
this.emit('loadJSON');
}.bind(this));
}.bind(this));