Skip to content

Commit 2631a5f

Browse files
marckhouzamvpnachev
authored andcommitted
Fix linter
Signed-off-by: Marc Khouzam <[email protected]>
1 parent 94c0e47 commit 2631a5f

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

staging/src/k8s.io/kubectl/pkg/util/completion/completion.go

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -325,10 +325,12 @@ func compGetResourceList(restClientGetter genericclioptions.RESTClientGetter, cm
325325
o.Verbs = []string{"get"}
326326
// TODO:Should set --request-timeout=5s
327327

328-
o.Complete(restClientGetter, cmd, nil)
328+
if err := o.Complete(restClientGetter, cmd, nil); err != nil {
329+
return []string{}
330+
}
329331

330332
// Ignore errors as the output may still be valid
331-
o.RunAPIResources()
333+
_ = o.RunAPIResources()
332334

333335
// Resources can be a comma-separated list. The last element is then
334336
// the one we should complete. For example if toComplete=="pods,secre"

0 commit comments

Comments
 (0)