From f32e11773697ddf319669fad5afc4ac1737e64ef Mon Sep 17 00:00:00 2001 From: Jan De Dobbeleer Date: Sun, 17 Nov 2024 11:27:25 +0100 Subject: [PATCH] chore(upgrade): do not hint shell restart on same version --- src/upgrade/cli.go | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/upgrade/cli.go b/src/upgrade/cli.go index 3e0b863c..a4d16d3d 100644 --- a/src/upgrade/cli.go +++ b/src/upgrade/cli.go @@ -61,7 +61,14 @@ func (m *model) Init() tea.Cmd { return } - program.Send(resultMsg("🚀 Upgrade successful, restart your shell to take full advantage of the new functionality.")) + message := "🚀 Upgrade successful" + + current := fmt.Sprintf("v%s", build.Version) + if current != m.tag { + message += ", restart your shell to take full advantage of the new functionality" + } + + program.Send(resultMsg(message)) }() }()