Skip to content

Commit

Permalink
fix(cli): allow running --version without a subcommand
Browse files Browse the repository at this point in the history
  • Loading branch information
malept committed Oct 27, 2023
1 parent 41a1b8b commit c207ba2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion cmd/root/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,7 @@ func Execute(defaultCommand string) {
cmdFound = true
}
if len(os.Args) >= 2 {
if arg := os.Args[1]; arg == "--help" || arg == "-h" || arg == "help" {
if arg := os.Args[1]; arg == "--help" || arg == "-h" || arg == "help" || arg == "--version" || arg == "-v" {
cmdFound = true
}
}
Expand Down

0 comments on commit c207ba2

Please sign in to comment.