Skip to content

Commit

Permalink
Prefix version with a v.
Browse files Browse the repository at this point in the history
  • Loading branch information
BogdanHabic committed Nov 9, 2018
1 parent 32e6f69 commit 2fe6514
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ package main
import (
"fmt"
"os"
"strings"
)

var (
Expand All @@ -14,6 +15,10 @@ var CurrentCLIVersion string
func Execute() {
CurrentCLIVersion = version

if !strings.HasPrefix(CurrentCLIVersion, "v") {
CurrentCLIVersion = fmt.Sprintf("v%s", CurrentCLIVersion)
}

MaybeCheckVersion()

if err := rootCmd.Execute(); err != nil {
Expand Down

0 comments on commit 2fe6514

Please sign in to comment.