Skip to content

Commit

Permalink
Fix: cannot find resource when input exactly equals to resource
Browse files Browse the repository at this point in the history
  • Loading branch information
keisku committed May 8, 2024
1 parent 025cb11 commit 77122fd
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions explore/options.go
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,11 @@ func (o *Options) Complete(f cmdutil.Factory, args []string) error {
return err
}

if gvar, ok := gvarMap[o.inputFieldPath]; ok {
o.gvrs = []schema.GroupVersionResource{gvar.GroupVersionResource}
return nil
}

var gvar *groupVersionAPIResource
var resourceIdx int
for i := len(o.inputFieldPath); i > 0; i-- {
Expand Down

0 comments on commit 77122fd

Please sign in to comment.