X Tutup
Skip to content

Commit aaad263

Browse files
committed
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
1 parent ba0a441 commit aaad263

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

main.go

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,10 +33,14 @@ func main() {
3333

3434
newRelease := <-updateMessageChan
3535
if newRelease != nil {
36-
msg := fmt.Sprintf(`A new release of gh is available: %s → %s
37-
Release notes: %s`, currentVersion, newRelease.Version, newRelease.URL)
36+
msg := fmt.Sprintf("%s %s → %s\n%s",
37+
ansi.Color("A new release of gh is available:", "yellow"),
38+
ansi.Color(currentVersion, "cyan"),
39+
ansi.Color(newRelease.Version, "cyan"),
40+
ansi.Color(newRelease.URL, "yellow"))
41+
3842
stderr := utils.NewColorable(os.Stderr)
39-
fmt.Fprintf(stderr, "\n\n%s\n\n", ansi.Color(msg, "cyan"))
43+
fmt.Fprintf(stderr, "\n\n%s\n\n", msg)
4044
}
4145
}
4246

0 commit comments

Comments
 (0)
X Tutup