Skip to content

Commit

Permalink
fix(upgrade): align notice with platform
Browse files Browse the repository at this point in the history
  • Loading branch information
JanDeDobbeleer committed Jun 14, 2024
1 parent 129c41b commit 2686a80
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 9 deletions.
8 changes: 8 additions & 0 deletions src/upgrade/cli.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
)

Expand Down
10 changes: 9 additions & 1 deletion src/upgrade/cli_other.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
)
10 changes: 2 additions & 8 deletions src/upgrade/notice.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,14 +30,8 @@ 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"
RELEASEURL = "https://api.github.com/repos/jandedobbeleer/oh-my-posh/releases/latest"
CACHEKEY = "upgrade_check"
)

func Latest(env platform.Environment) (string, error) {
Expand Down

4 comments on commit 2686a80

@phoroszowski
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could today's updates have broken the basic linux Manual install? curl -s https://ohmyposh.dev/install.sh | bash -s ? releases seems to be gone from the repository and are used by the script.

@JanDeDobbeleer
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@phoroszowski no, this seems to still work on my end.

image

@phoroszowski
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah worked on my Mac. posh-darwin-arm64 is there

https://github.com/JanDeDobbeleer/oh-my-posh/releases/latest/download/posh-linux-amd64

linux-amd64 is gone.

@JanDeDobbeleer
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.