-
Notifications
You must be signed in to change notification settings - Fork 39k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Deduplicate list of directories #69089
Conversation
/kind bug |
/retest |
pkg/kubectl/cmd/plugin.go
Outdated
@@ -227,3 +228,15 @@ func isExecutable(fullPath string) (bool, error) { | |||
|
|||
return false, nil | |||
} | |||
|
|||
func unique(items []string) []string { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We could alternatively use the "sets" package from apimachinery: "k8s.io/apimachinery/pkg/util/sets.NewString"
d8e38eb
to
8555b53
Compare
@juanvallejo good point, updated. PTAL |
/lgtm |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: juanvallejo, soltysh The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
Should this be cherry-picked into 1.12? |
Yes, this should be part of the 1.12 release |
Please add the cherrypick-candidate label. |
It was removed since nobody used it. Only cherrypick-approved is useful on backport PRs. |
I see. So potentially this is delayed until 1.13 or it could go out in a patch release for 1.12? |
#69170 was a 1.12 cherry-pick, so watch out for release patch. |
Which issue(s) this PR fixes (optional, in
fixes #<issue number>(, fixes #<issue_number>, ...)
format, will close the issue(s) when PR gets merged):Fixes kubernetes/kubectl#539
/assign @juanvallejo
Btw. we should add some tests for plugin command.
Release note: