Skip to content

Commit

Permalink
Merge pull request #150 from getoutreach/malept/fix/root-version
Browse files Browse the repository at this point in the history
fix(cli): allow running --version without a subcommand
  • Loading branch information
monde authored Oct 30, 2023
2 parents 41a1b8b + c207ba2 commit 2e98960
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 2e98960

Please sign in to comment.