From aaad263a3e6c5c155cf00dc703969263b209c660 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mislav=20Marohni=C4=87?= Date: Wed, 4 Dec 2019 15:14:48 +0100 Subject: [PATCH] Update output of upgrade available notice - Individual components are now colored - We don't say "Release notes" anymore since the URL doesn't contain any release notes yet --- main.go | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/main.go b/main.go index 56c205335..2d9ea037d 100644 --- a/main.go +++ b/main.go @@ -33,10 +33,14 @@ func main() { newRelease := <-updateMessageChan if newRelease != nil { - msg := fmt.Sprintf(`A new release of gh is available: %s → %s -Release notes: %s`, currentVersion, newRelease.Version, newRelease.URL) + msg := fmt.Sprintf("%s %s → %s\n%s", + ansi.Color("A new release of gh is available:", "yellow"), + ansi.Color(currentVersion, "cyan"), + ansi.Color(newRelease.Version, "cyan"), + ansi.Color(newRelease.URL, "yellow")) + stderr := utils.NewColorable(os.Stderr) - fmt.Fprintf(stderr, "\n\n%s\n\n", ansi.Color(msg, "cyan")) + fmt.Fprintf(stderr, "\n\n%s\n\n", msg) } }