Strip the "v" prefix when displaying gh version string
This commit is contained in:
parent
b21b93abe9
commit
4ec31ffd57
1 changed files with 2 additions and 1 deletions
|
|
@ -3,6 +3,7 @@ package command
|
|||
import (
|
||||
"fmt"
|
||||
"os"
|
||||
"strings"
|
||||
|
||||
"github.com/github/gh-cli/api"
|
||||
"github.com/github/gh-cli/context"
|
||||
|
|
@ -17,7 +18,7 @@ var Version = "DEV"
|
|||
var BuildDate = "YYYY-MM-DD"
|
||||
|
||||
func init() {
|
||||
RootCmd.Version = fmt.Sprintf("%s (%s)", Version, BuildDate)
|
||||
RootCmd.Version = fmt.Sprintf("%s (%s)", strings.TrimPrefix(Version, "v"), BuildDate)
|
||||
RootCmd.PersistentFlags().StringP("repo", "R", "", "current GitHub repository")
|
||||
RootCmd.PersistentFlags().StringP("current-branch", "B", "", "current git branch")
|
||||
// TODO:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue