From 803ab6ed30b7050772eebba947c9899177316665 Mon Sep 17 00:00:00 2001 From: Roman Khavronenko Date: Tue, 1 Nov 2022 19:50:22 +0100 Subject: [PATCH] vmctl: fix panic on start (#3300) The change disables initing the `-version` flag in new `urfave/cli/v2` update. The `-version` flag conflicts with the identical flag from `lib/buildinfo` and causes panic. See https://github.com/VictoriaMetrics/VictoriaMetrics/pull/3299 Signed-off-by: hagen1778 --- app/vmctl/main.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/app/vmctl/main.go b/app/vmctl/main.go index 891ff0c784..92481a167f 100644 --- a/app/vmctl/main.go +++ b/app/vmctl/main.go @@ -34,6 +34,9 @@ func main() { Name: "vmctl", Usage: "VictoriaMetrics command-line tool", Version: buildinfo.Version, + // Disable `-version` flag to avoid conflict with lib/buildinfo flags + // see https://github.com/urfave/cli/issues/1560 + HideVersion: true, Commands: []*cli.Command{ { Name: "opentsdb",