kustomize
kustomize copied to clipboard
kustomize cfg grep with no arguments causes panic
trafficstars
$ 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/[email protected]/command.go:968 +0x7e8
github.com/spf13/cobra.(*Command).ExecuteC(0x14000183500)
/home/runner/go/pkg/mod/github.com/spf13/[email protected]/command.go:1115 +0x344
github.com/spf13/cobra.(*Command).Execute(0x1019f1888?)
/home/runner/go/pkg/mod/github.com/spf13/[email protected]/command.go:1039 +0x1c
main.main()
/home/runner/work/kustomize/kustomize/kustomize/main.go:14 +0x20
Kustomize version
v5.4.1
Operating system
MacOS