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

kustomize cfg grep with no arguments causes panic #5701

Closed
paololazzari opened this issue May 22, 2024 · 2 comments · Fixed by #5707
Closed

kustomize cfg grep with no arguments causes panic #5701

paololazzari opened this issue May 22, 2024 · 2 comments · Fixed by #5707
Assignees
Labels
kind/bug Categorizes issue or PR as related to a bug. triage/accepted Indicates an issue or PR is ready to be actively worked on.

Comments

@paololazzari
Copy link

paololazzari commented May 22, 2024

$ kustomize cfg grep 
panic: runtime error: index out of range [0] with length 0

goroutine 1 [running]:
sigs.k8s.io/kustomize/cmd/config/internal/commands.(*GrepRunner).preRunE(0xd?, 0x0?, {0x101adc1a0?, 0x100e93c6c?, 0x14000179d00?})
	/home/runner/work/kustomize/kustomize/cmd/config/internal/commands/grep.go:69 +0x3cc
github.com/spf13/cobra.(*Command).execute(0x1400027ac00, {0x101adc1a0, 0x0, 0x0})
	/home/runner/go/pkg/mod/github.com/spf13/cobra@v1.8.0/command.go:968 +0x7e8
github.com/spf13/cobra.(*Command).ExecuteC(0x14000183500)
	/home/runner/go/pkg/mod/github.com/spf13/cobra@v1.8.0/command.go:1115 +0x344
github.com/spf13/cobra.(*Command).Execute(0x1019f1888?)
	/home/runner/go/pkg/mod/github.com/spf13/cobra@v1.8.0/command.go:1039 +0x1c
main.main()
	/home/runner/work/kustomize/kustomize/kustomize/main.go:14 +0x20

Kustomize version

v5.4.1

Operating system

MacOS

@paololazzari paololazzari added the kind/bug Categorizes issue or PR as related to a bug. label May 22, 2024
@k8s-ci-robot k8s-ci-robot added the needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one. label May 22, 2024
@deszhou
Copy link
Member

deszhou commented May 28, 2024

/assign

@stormqueen1990
Copy link
Member

/triage accepted

@k8s-ci-robot k8s-ci-robot added triage/accepted Indicates an issue or PR is ready to be actively worked on. and removed needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one. labels May 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Categorizes issue or PR as related to a bug. triage/accepted Indicates an issue or PR is ready to be actively worked on.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants