From 6e3841c494d96c722a4811dd6095fa75258b4bd9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marko=20Luk=C5=A1a?= Date: Fri, 18 Oct 2024 14:00:58 +0200 Subject: [PATCH] Also print version when running `./sail-operator version` MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Marko Lukša --- cmd/main.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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) }