mattolenik / hclq

Command-line processor for HashiCorp config files, like sed for HCL — Terraform, Consul, Nomad, Vault
https://hclq.sh
The Unlicense
254 stars 23 forks source link

Error with example "panic: unable to redefine 'i' shorthand in "set" flagset: it's already used for "in-place" flag" #6

Closed edmundkwok closed 5 years ago

edmundkwok commented 5 years ago

Thanks for the really useful tool Matthew!

I'm on macOS, installed the latest version (0.5.2), trying out the example, specifically set, but having this error, for both string and lists:

panic: unable to redefine 'i' shorthand in "set" flagset: it's already used for "in-place" flag

goroutine 1 [running]:
github.com/mattolenik/hclq/vendor/github.com/spf13/pflag.(*FlagSet).AddFlag(0xc0000b4800, 0xc00009e5a0)
    /home/appveyor/go/src/github.com/mattolenik/hclq/vendor/github.com/spf13/pflag/flag.go:862 +0x6e5
github.com/mattolenik/hclq/vendor/github.com/spf13/pflag.(*FlagSet).AddFlagSet.func1(0xc00009e5a0)
    /home/appveyor/go/src/github.com/mattolenik/hclq/vendor/github.com/spf13/pflag/flag.go:875 +0x6f
github.com/mattolenik/hclq/vendor/github.com/spf13/pflag.(*FlagSet).VisitAll(0xc0000b4700, 0xc0000a7ba8)
    /home/appveyor/go/src/github.com/mattolenik/hclq/vendor/github.com/spf13/pflag/flag.go:278 +0x97
github.com/mattolenik/hclq/vendor/github.com/spf13/pflag.(*FlagSet).AddFlagSet(0xc0000b4800, 0xc0000b4700)
    /home/appveyor/go/src/github.com/mattolenik/hclq/vendor/github.com/spf13/pflag/flag.go:873 +0x58
github.com/mattolenik/hclq/vendor/github.com/spf13/cobra.(*Command).mergePersistentFlags(0x1373300)
    /home/appveyor/go/src/github.com/mattolenik/hclq/vendor/github.com/spf13/cobra/command.go:1495 +0x90
github.com/mattolenik/hclq/vendor/github.com/spf13/cobra.stripFlags(0xc0000702e0, 0x2, 0x2, 0x1373300, 0x2, 0x0, 0x2)
    /home/appveyor/go/src/github.com/mattolenik/hclq/vendor/github.com/spf13/cobra/command.go:474 +0x51
github.com/mattolenik/hclq/vendor/github.com/spf13/cobra.(*Command).Find.func1(0x1373300, 0xc0000702e0, 0x2, 0x2, 0x3, 0xc0000702e0, 0x2, 0x2)
    /home/appveyor/go/src/github.com/mattolenik/hclq/vendor/github.com/spf13/cobra/command.go:533 +0x5c
github.com/mattolenik/hclq/vendor/github.com/spf13/cobra.(*Command).Find.func1(0x13730a0, 0xc000084090, 0x3, 0x3, 0x11fa75c, 0x29, 0xc0000c2000, 0x70)
    /home/appveyor/go/src/github.com/mattolenik/hclq/vendor/github.com/spf13/cobra/command.go:541 +0x119
github.com/mattolenik/hclq/vendor/github.com/spf13/cobra.(*Command).Find(0x13730a0, 0xc000084090, 0x3, 0x3, 0x2, 0xc00009e6e0, 0xc000082320, 0xc0000a7e88, 0x114034e, 0xc0000b4400)
    /home/appveyor/go/src/github.com/mattolenik/hclq/vendor/github.com/spf13/cobra/command.go:546 +0xab
github.com/mattolenik/hclq/vendor/github.com/spf13/cobra.(*Command).ExecuteC(0x13730a0, 0xc0000a7f88, 0x10052a0, 0xc000064058)
    /home/appveyor/go/src/github.com/mattolenik/hclq/vendor/github.com/spf13/cobra/command.go:833 +0x64b
github.com/mattolenik/hclq/vendor/github.com/spf13/cobra.(*Command).Execute(0x13730a0, 0x0, 0x0)
    /home/appveyor/go/src/github.com/mattolenik/hclq/vendor/github.com/spf13/cobra/command.go:800 +0x2b
github.com/mattolenik/hclq/cmd.Execute()
    /home/appveyor/go/src/github.com/mattolenik/hclq/cmd/root.go:52 +0x2d
main.main()
    /home/appveyor/go/src/github.com/mattolenik/hclq/main.go:6 +0x20

Do you know what could be wrong?