Fix kubectl plugin list overshadow detection on Windows

Kubernetes-commit: 7bb838e50b5b878b19151bd03cb3e20bf8746740
This commit is contained in:
kita456 2026-02-02 22:09:05 +09:00 committed by Kubernetes Publisher
parent 50c35e77ed
commit f082187cdc

View file

@ -217,8 +217,7 @@ func (v *CommandOverrideVerifier) Verify(path string) []error {
}
// extract the plugin binary name
segs := strings.Split(path, "/")
binName := segs[len(segs)-1]
binName := filepath.Base(path)
cmdPath := strings.Split(binName, "-")
if len(cmdPath) > 1 {