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:
@@ -389,7 +389,10 @@ func RunCreateSubcommand(f cmdutil.Factory, options *CreateSubcommandOptions) er
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
mapper := f.RESTMapper()
|
||||
mapper, err := f.RESTMapper()
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
if !options.DryRun {
|
||||
// create subcommands have compiled knowledge of things they create, so type them directly
|
||||
gvks, _, err := legacyscheme.Scheme.ObjectKinds(obj)
|
||||
|
||||
Reference in New Issue
Block a user