mirror of
https://github.com/JanDeDobbeleer/oh-my-posh.git
synced 2024-11-09 20:44:03 -08:00
parent
8b6933160a
commit
37b8e55131
|
@ -41,11 +41,10 @@ var upgradeCmd = &cobra.Command{
|
|||
terminal.Init(env.Shell())
|
||||
fmt.Print(terminal.StartProgress())
|
||||
|
||||
defer fmt.Print(terminal.StopProgress())
|
||||
|
||||
latest, err := upgrade.Latest(env)
|
||||
if err != nil {
|
||||
fmt.Printf("\n❌ %s\n\n", err)
|
||||
terminal.StopProgress()
|
||||
os.Exit(1)
|
||||
return
|
||||
}
|
||||
|
@ -63,6 +62,8 @@ var upgradeCmd = &cobra.Command{
|
|||
if !cfg.DisableNotice {
|
||||
fmt.Print("\n✅ no new version available\n\n")
|
||||
}
|
||||
|
||||
terminal.StopProgress()
|
||||
return
|
||||
}
|
||||
|
||||
|
@ -77,6 +78,7 @@ func executeUpgrade(latest string) {
|
|||
}
|
||||
|
||||
fmt.Printf("\n❌ %s\n\n", err)
|
||||
terminal.StopProgress()
|
||||
os.Exit(1)
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue