Fix linter

Signed-off-by: Marc Khouzam <marc.khouzam@gmail.com>

Kubernetes-commit: d194619979252d33c525e972cfaf0eea9dc64b43
This commit is contained in:
Marc Khouzam 2025-08-28 23:04:35 -07:00 committed by Kubernetes Publisher
parent 4dec168032
commit aa186336f3
1 changed files with 4 additions and 2 deletions

View File

@ -325,10 +325,12 @@ func compGetResourceList(restClientGetter genericclioptions.RESTClientGetter, cm
o.Verbs = []string{"get"}
// TODO:Should set --request-timeout=5s
o.Complete(restClientGetter, cmd, nil)
if err := o.Complete(restClientGetter, cmd, nil); err != nil {
return []string{}
}
// Ignore errors as the output may still be valid
o.RunAPIResources()
_ = o.RunAPIResources()
// Resources can be a comma-separated list. The last element is then
// the one we should complete. For example if toComplete=="pods,secre"