Skip to content

Commit 5687721

Browse files
rikatzk8s-publishing-bot
authored andcommitted
Return error in case of discovery client failure
Kubernetes-commit: 011338f9efc17372f8f99abe3b2b047e7e58ac49
1 parent f27873f commit 5687721

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

pkg/cmd/apiresources/apiresources.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -229,6 +229,9 @@ func (o *APIResourceOptions) RunAPIResources() error {
229229
allResources = append(allResources, apiList)
230230
}
231231

232+
if len(allResources) == 0 {
233+
return utilerrors.NewAggregate(errs)
234+
}
232235
flatList := &metav1.APIResourceList{
233236
TypeMeta: metav1.TypeMeta{
234237
APIVersion: allResources[0].APIVersion,

0 commit comments

Comments
 (0)