Skip to content

Commit

Permalink
Merge pull request #2131 from rohantmp/fixVersionCheck
Browse files Browse the repository at this point in the history
fix(cli): do not upgrade if latest stable is older(eg: beta)
  • Loading branch information
FabianKramm authored Sep 11, 2024
2 parents 1b3c86b + dd5eb4e commit b3eb551
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion pkg/upgrade/upgrade.go
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,8 @@ func CheckForNewerVersion() (string, error) {
}

v := semver.MustParse(version)
if !found || latest.Version.Equals(v) {
// if latest not found or latest version found is less than or equal to the current version, do not upgrade
if !found || latest.Version.Compare(v) != 1 {
return
}

Expand Down

0 comments on commit b3eb551

Please sign in to comment.