From c207ba2e908a2d620f7db34a63b25e879b849d97 Mon Sep 17 00:00:00 2001 From: Mark Lee Date: Fri, 27 Oct 2023 11:34:27 -0700 Subject: [PATCH] fix(cli): allow running --version without a subcommand --- cmd/root/root.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmd/root/root.go b/cmd/root/root.go index 57f9f6d..473f58a 100644 --- a/cmd/root/root.go +++ b/cmd/root/root.go @@ -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 } }