fix(upgrade): use correct version to compare against

This commit is contained in:
Jan De Dobbeleer 2024-07-22 11:24:09 +02:00 committed by Jan De Dobbeleer
parent b356900c30
commit 7ab48aff70

View file

@ -57,7 +57,7 @@ var upgradeCmd = &cobra.Command{
version := fmt.Sprintf("v%s", build.Version)
if upgrade.IsMajorUpgrade(build.Version, latest) {
if upgrade.IsMajorUpgrade(version, latest) {
message := terminal.StopProgress()
message += fmt.Sprintf("\n🚨 major upgrade available: %s -> %s, use oh-my-posh upgrade --force to upgrade\n\n", version, latest)
fmt.Print(message)