From 6065070baed175853301a6396697f2fd6fbc511e Mon Sep 17 00:00:00 2001 From: Valentin Rothberg Date: Fri, 26 Jul 2019 10:44:03 +0200 Subject: fix `podman -v` regression Re-add the shortflag for --version and add e2e tests to avoid regressing in the future. Signed-off-by: Valentin Rothberg --- cmd/podman/main.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'cmd') diff --git a/cmd/podman/main.go b/cmd/podman/main.go index 72d1754ac..1b54c9458 100644 --- a/cmd/podman/main.go +++ b/cmd/podman/main.go @@ -91,7 +91,7 @@ func init() { rootCmd.Version = version.Version // Override default --help information of `--version` global flag var dummyVersion bool - rootCmd.PersistentFlags().BoolVar(&dummyVersion, "version", false, "Version for podman") + rootCmd.Flags().BoolVarP(&dummyVersion, "version", "v", false, "Version of podman") rootCmd.AddCommand(mainCommands...) rootCmd.AddCommand(getMainCommands()...) } -- cgit v1.2.3-54-g00ecf