mirror of
https://github.com/kubernetes/kubectl.git
synced 2026-06-09 08:51:18 -04:00
Return error in case of discovery client failure
Kubernetes-commit: 011338f9efc17372f8f99abe3b2b047e7e58ac49
This commit is contained in:
parent
f27873ff3a
commit
5687721b88
1 changed files with 3 additions and 0 deletions
|
|
@ -229,6 +229,9 @@ func (o *APIResourceOptions) RunAPIResources() error {
|
|||
allResources = append(allResources, apiList)
|
||||
}
|
||||
|
||||
if len(allResources) == 0 {
|
||||
return utilerrors.NewAggregate(errs)
|
||||
}
|
||||
flatList := &metav1.APIResourceList{
|
||||
TypeMeta: metav1.TypeMeta{
|
||||
APIVersion: allResources[0].APIVersion,
|
||||
|
|
|
|||
Loading…
Reference in a new issue