Skip to content

Commit

Permalink
Merge pull request #40 from keisku/fix-bug-when-input-equals-resource
Browse files Browse the repository at this point in the history
Fix: cannot find resource when input exactly equals to resource
  • Loading branch information
keisku authored May 8, 2024
2 parents 025cb11 + 3a15ff9 commit 10feacc
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions explore/options.go
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,12 @@ func (o *Options) Complete(f cmdutil.Factory, args []string) error {
return err
}

if gvar, ok := gvarMap[o.inputFieldPath]; ok {
o.inputFieldPathRegex = regexp.MustCompile(".*")
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 10feacc

Please sign in to comment.