mirror of
https://github.com/kubernetes-sigs/kustomize.git
synced 2026-06-12 01:14:22 +00:00
fix:kustomize cfg grep with no arguments causes panic (#5707)
* fix:kustomize cfg grep with no arguments causes panic * add test for kustomize cfg grep with no arguments
This commit is contained in:
@@ -54,6 +54,9 @@ type GrepRunner struct {
|
||||
}
|
||||
|
||||
func (r *GrepRunner) preRunE(c *cobra.Command, args []string) error {
|
||||
if len(args) == 0 {
|
||||
return fmt.Errorf("missing required argument: QUERY")
|
||||
}
|
||||
r.GrepFilter.Compare = func(a, b string) (int, error) {
|
||||
qa, err := resource.ParseQuantity(a)
|
||||
if err != nil {
|
||||
|
||||
Reference in New Issue
Block a user