Skip to content

Commit

Permalink
fix version checker
Browse files Browse the repository at this point in the history
  • Loading branch information
dreth committed Aug 30, 2024
1 parent 1ac2590 commit 9bd734a
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion version.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ package main

import (
"encoding/json"
"fmt"
"net/http"
"time"

Expand Down Expand Up @@ -45,7 +46,7 @@ func CheckForNewVersion() string {

c2 := color.New(color.FgGreen, color.Bold)

if Version != latestVersion {
if fmt.Sprintf("v%s", Version) != latestVersion {
// Print the new version message in red and bold
return c.Sprintf("\n A new version of hbd-cli is available: %s (current: %s)\n", latestVersion, Version) + c2.Sprint(" Download it: https://github.com/dreth/hbd-cli/releases/latest")
}
Expand Down

0 comments on commit 9bd734a

Please sign in to comment.