mirror of
https://github.com/JanDeDobbeleer/oh-my-posh.git
synced 2025-02-02 05:41:10 -08:00
feat(upgrade): use built-in upgrade by default
This commit is contained in:
parent
1d53e088cb
commit
527eef0526
|
@ -33,13 +33,8 @@ const (
|
||||||
RELEASEURL = "https://api.github.com/repos/jandedobbeleer/oh-my-posh/releases/latest"
|
RELEASEURL = "https://api.github.com/repos/jandedobbeleer/oh-my-posh/releases/latest"
|
||||||
upgradeNotice = `
|
upgradeNotice = `
|
||||||
A new release of Oh My Posh is available: %s → %s
|
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"
|
CACHEKEY = "upgrade_check"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@ -82,15 +77,5 @@ func Notice(env platform.Environment, force bool) (string, bool) {
|
||||||
return "", false
|
return "", false
|
||||||
}
|
}
|
||||||
|
|
||||||
var notice string
|
return fmt.Sprintf(upgradeNotice, version, latest), true
|
||||||
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
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue