Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: remove shorthand flag for topp option in add command #1115

Merged
merged 1 commit into from
May 20, 2024

Conversation

chenrui333
Copy link
Contributor

see some build failure in Homebrew/homebrew-core#171893

==> /home/linuxbrew/.linuxbrew/Cellar/k8sgpt/0.3.31/bin/k8sgpt analyze --explain --filter=Service
  panic: unable to redefine 'c' shorthand in "add" flagset: it's already used for "topp" flag
  
  goroutine 1 [running]:
  github.com/spf13/pflag.(*FlagSet).AddFlag(0xc0001c6e00, 0xc00055bae0)
  	github.com/spf13/[email protected]/flag.go:874 +0x3f5
  github.com/spf13/pflag.(*FlagSet).VarPF(0xc0001c6e00, {0x4bf0978, 0x6868708}, {0x433bbd3, 0x4}, {0x4bb9e70, 0x1}, {0x444b73e, 0xca})
  	github.com/spf13/[email protected]/flag.go:831 +0x105
  github.com/spf13/pflag.(*FlagSet).VarP(...)
  	github.com/spf13/[email protected]/flag.go:837
  github.com/spf13/pflag.(*FlagSet).Int32VarP(0x4427598?, 0x5e?, {0x433bbd3?, 0x10?}, {0x4bb9e70?, 0x3d7[51](https://github.com/Homebrew/homebrew-core/actions/runs/9115237344/job/25061178026?pr=171893#step:4:52)01?}, 0x4bb1f48?, {0x444b73e?, 0x0?})
  	github.com/spf13/[email protected]/int32.go:50 +0x45
  github.com/k8sgpt-ai/k8sgpt/cmd/auth.init.0()
  	github.com/k8sgpt-ai/k8sgpt/cmd/auth/add.go:166 +0x229
  
  Error: k8sgpt: failed
  Error: k8sgpt: failed
  An exception occurred within a child process:
    Minitest::Assertion: Expected: 1
    Actual: 2

thus removing shorthand flag for topp option

@chenrui333 chenrui333 requested review from a team as code owners May 16, 2024 17:23
@chenrui333 chenrui333 changed the title fix: Remove shorthand flag for topp option in add command fix: remove shorthand flag for topp option in add command May 16, 2024
@chenrui333
Copy link
Contributor Author

cc @k8sgpt-ai/k8sgpt-maintainers

@AlexsJones
Copy link
Member

Thanks @chenrui333 looks good

@AlexsJones AlexsJones merged commit e261c09 into k8sgpt-ai:main May 20, 2024
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

2 participants