Skip to content

Commit

Permalink
Improve handling of non-semver versions in git resolver (#2316)
Browse files Browse the repository at this point in the history
  • Loading branch information
GvS666 authored and sheerun committed Nov 7, 2016
1 parent 3209cda commit 7896224
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/core/resolvers/GitResolver.js
Expand Up @@ -206,7 +206,7 @@ GitResolver.prototype._savePkgMeta = function (meta) {
version = semver.clean(this._resolution.tag);

// Warn if the package meta version is different than the resolved one
if (typeof meta.version === 'string' && semver.neq(meta.version, version)) {
if (typeof meta.version === 'string' && semver.valid(meta.version) && semver.neq(meta.version, version)) {
this._logger.warn('mismatch', 'Version declared in the json (' + meta.version + ') is different than the resolved one (' + version + ')', {
resolution: this._resolution,
pkgMeta: meta
Expand Down

0 comments on commit 7896224

Please sign in to comment.