Skip to content

Commit

Permalink
feat(upgrade): use built-in upgrade by default
Browse files Browse the repository at this point in the history
  • Loading branch information
JanDeDobbeleer committed Jun 14, 2024
1 parent 1d53e08 commit 527eef0
Showing 1 changed file with 2 additions and 17 deletions.
19 changes: 2 additions & 17 deletions src/upgrade/notice.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,13 +33,8 @@ const (
RELEASEURL = "https://api.github.com/repos/jandedobbeleer/oh-my-posh/releases/latest"
upgradeNotice = `
A new release of Oh My Posh is available: %s → %s
%s
To upgrade, run: 'oh-my-posh upgrade'
`
windows = `To upgrade, use the guide for your favorite package manager in the documentation:
https://ohmyposh.dev/docs/installation/windows#update`
unix = "To upgrade, use your favorite package manager or, if you used Homebrew to install, run: 'brew update; brew upgrade oh-my-posh'"
darwin = "To upgrade, run: 'brew update; brew upgrade oh-my-posh'"

CACHEKEY = "upgrade_check"
)

Expand Down Expand Up @@ -82,15 +77,5 @@ func Notice(env platform.Environment, force bool) (string, bool) {
return "", false
}

var notice string
switch env.GOOS() {
case platform.WINDOWS:
notice = windows
case platform.DARWIN:
notice = darwin
case platform.LINUX:
notice = unix
}

return fmt.Sprintf(upgradeNotice, version, latest, notice), true
return fmt.Sprintf(upgradeNotice, version, latest), true
}

0 comments on commit 527eef0

Please sign in to comment.