From 82ac154d56fe6515f9023bd3ce12f0f587918cf4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mislav=20Marohni=C4=87?= Date: Mon, 2 May 2022 13:29:10 +0200 Subject: [PATCH] Consistent version format in version upgrade notice We can strip the "v" prefix where it's unambiguous that we're talking about version numbers. Before: A new release of gh is available: 2.8.0 => v2.9.0 After: A new release of gh is available: 2.8.0 => 2.9.0 --- cmd/gh/main.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cmd/gh/main.go b/cmd/gh/main.go index 72426c868..38c6b2fa1 100644 --- a/cmd/gh/main.go +++ b/cmd/gh/main.go @@ -279,8 +279,8 @@ func mainRun() exitCode { } fmt.Fprintf(stderr, "\n\n%s %s → %s\n", ansi.Color("A new release of gh is available:", "yellow"), - ansi.Color(buildVersion, "cyan"), - ansi.Color(newRelease.Version, "cyan")) + ansi.Color(strings.TrimPrefix(buildVersion, "v"), "cyan"), + ansi.Color(strings.TrimPrefix(newRelease.Version, "v"), "cyan")) if isHomebrew { fmt.Fprintf(stderr, "To upgrade, run: %s\n", "brew update && brew upgrade gh") }