This commit is contained in:
André Cruz
2012-12-30 11:40:45 +00:00
parent 64ed10530b
commit 05e44d5148
2 changed files with 5 additions and 0 deletions

View File

@@ -540,6 +540,10 @@ Package.prototype.checkout = function () {
// If tag is specified, try to satisfy it
if (this.tag) {
if (!semver.valid(this.tag)) {
return this.emit('error', new Error('Tag ' + this.tag + ' is not a valid semver version'));
}
versions = versions.filter(function (version) {
return semver.satisfies(version, this.tag);
}.bind(this));