Skip to content

Commit 813680e

Browse files
committed
fix: should use the local version number if the cache falls behind
1 parent e1b8519 commit 813680e

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

packages/@vue/cli/lib/util/getVersions.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,11 @@ module.exports = async function getVersions () {
4545
latest = cached
4646
}
4747

48+
// if the installed version is updated but the cache doesn't update
49+
if (semver.gt(local, latest) && !semver.prerelease(local)) {
50+
latest = local
51+
}
52+
4853
let latestMinor = `${semver.major(latest)}.${semver.minor(latest)}.0`
4954
if (
5055
// if the latest version contains breaking changes

0 commit comments

Comments
 (0)