Skip to content

Commit

Permalink
fix(cli): do not upgrade if latest stable is older(eg: beta)
Browse files Browse the repository at this point in the history
Signed-off-by: Rohan CJ <[email protected]>
  • Loading branch information
rohantmp committed Sep 11, 2024
1 parent 478ff1e commit dd5eb4e
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 dd5eb4e

Please sign in to comment.