Closed PaulSonOfLars closed 7 months ago
Describe the bug Trying to get cluster configuration from the CLI will cause a panic.
panic: unable to redefine 'o' shorthand in "config" flagset: it's already used for "output-file" flag goroutine 1 [running]: github.com/spf13/pflag.(*FlagSet).AddFlag(0xc0001beb00, 0xc000099c20) github.com/spf13/pflag@v1.0.5/flag.go:874 +0x3e7 github.com/spf13/cobra.(*Command).mergePersistentFlags.(*FlagSet).AddFlagSet.func2(0xc000099c20) github.com/spf13/pflag@v1.0.5/flag.go:887 +0x3f github.com/spf13/pflag.(*FlagSet).VisitAll(0xc0001c7500?, 0xc0000e9bf8) github.com/spf13/pflag@v1.0.5/flag.go:290 +0xd8 github.com/spf13/pflag.(*FlagSet).AddFlagSet(...) github.com/spf13/pflag@v1.0.5/flag.go:885 github.com/spf13/cobra.(*Command).mergePersistentFlags(0xc0001c7500) github.com/spf13/cobra@v1.8.0/command.go:1852 +0xa9 github.com/spf13/cobra.(*Command).InitDefaultHelpFlag(0x1983ae0?) github.com/spf13/cobra@v1.8.0/command.go:1187 +0x1c github.com/spf13/cobra.(*Command).execute(0xc0001c7500, {0x1983ae0, 0x0, 0x0}) github.com/spf13/cobra@v1.8.0/command.go:885 +0x105 github.com/spf13/cobra.(*Command).ExecuteC(0x194f660) github.com/spf13/cobra@v1.8.0/command.go:1115 +0x3ff github.com/spf13/cobra.(*Command).Execute(...) github.com/spf13/cobra@v1.8.0/command.go:1039 github.com/vultr/vultr-cli/v3/cmd.Execute() github.com/vultr/vultr-cli/v3/cmd/root.go:62 +0x1a main.main() github.com/vultr/vultr-cli/v3/main.go:7 +0xf
To Reproduce Steps to reproduce the behavior:
vultr-cli kubernetes config
Expected behavior No panic
Screenshots See above error.
Desktop (please complete the following information where applicable:
Additional context
The error seems to be described by cobra already; flags are being redeclared.
Closing as I see this is a duplicate of the already-fixed #406; could we get a new release to fix this?
I'm cutting a new release this week.
Describe the bug Trying to get cluster configuration from the CLI will cause a panic.
To Reproduce Steps to reproduce the behavior:
vultr-cli kubernetes config
Expected behavior No panic
Screenshots See above error.
Desktop (please complete the following information where applicable:
Additional context
The error seems to be described by cobra already; flags are being redeclared.