mirror of
https://github.com/k3s-io/kubernetes.git
synced 2026-01-05 15:37:24 +00:00
acknowledge that creation of a restmapper can fail and that we cannot have a default
This commit is contained in:
@@ -643,7 +643,10 @@ func (o *RunOptions) createGeneratedObject(f cmdutil.Factory, cmd *cobra.Command
|
||||
return nil, err
|
||||
}
|
||||
|
||||
mapper := f.RESTMapper()
|
||||
mapper, err := f.RESTMapper()
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
// run has compiled knowledge of the thing is is creating
|
||||
groupVersionKinds, _, err := legacyscheme.Scheme.ObjectKinds(obj)
|
||||
if err != nil {
|
||||
|
||||
Reference in New Issue
Block a user