diff --git a/cmd/main.go b/cmd/main.go index 5a785c913..e1555e277 100644 --- a/cmd/main.go +++ b/cmd/main.go @@ -65,7 +65,7 @@ func main() { opts.BindFlags(flag.CommandLine) flag.Parse() - if printVersion { + if printVersion || flag.NArg() > 0 && flag.Arg(0) == "version" { fmt.Println(version.Info) os.Exit(0) }