Skip to content

Commit

Permalink
fix: should use the local version number if the cache falls behind
Browse files Browse the repository at this point in the history
  • Loading branch information
sodatea committed Feb 5, 2020
1 parent e1b8519 commit 813680e
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions packages/@vue/cli/lib/util/getVersions.js
Expand Up @@ -45,6 +45,11 @@ module.exports = async function getVersions () {
latest = cached
}

// if the installed version is updated but the cache doesn't update
if (semver.gt(local, latest) && !semver.prerelease(local)) {
latest = local
}

let latestMinor = `${semver.major(latest)}.${semver.minor(latest)}.0`
if (
// if the latest version contains breaking changes
Expand Down

0 comments on commit 813680e

Please sign in to comment.