fix(upgrade): align notice with platform

This commit is contained in:
Jan De Dobbeleer 2024-06-14 18:55:52 +02:00 committed by Jan De Dobbeleer
parent 129c41ba34
commit 2686a802a3
3 changed files with 19 additions and 9 deletions

View file

@ -20,7 +20,15 @@ var (
program *tea.Program
textStyle = lipgloss.NewStyle().Margin(1, 0, 2, 0)
title string
)
const (
upgradeNotice = `
A new release of Oh My Posh is available: %s %s
To upgrade, run: 'oh-my-posh upgrade'
To enable automated upgrades, set 'auto_upgrade' to 'true' in your configuration.
`
Supported = true
)

View file

@ -4,8 +4,16 @@ package upgrade
import "github.com/jandedobbeleer/oh-my-posh/src/platform"
const (
upgradeNotice = `
A new release of Oh My Posh is available: %s %s
To upgrade, use your favorite package manager or, if you used Homebrew to install, run: 'brew update; brew upgrade oh-my-posh'
`
)
func Run(_ platform.Environment) {}
var (
const (
Supported = false
)

View file

@ -31,12 +31,6 @@ type release struct {
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
To upgrade, run: 'oh-my-posh upgrade'
To enable automated upgrades, set 'auto_upgrade' to 'true' in your configuration.
`
CACHEKEY = "upgrade_check"
)