mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-23 19:56:01 +00:00
Fix error handling for kubectl create configmap
This patch changes to return when `createConfigMap()` returns error.
This commit is contained in:
parent
c08526c7f7
commit
6caf4d66bd
@ -215,7 +215,7 @@ func (o *ConfigMapOptions) Validate() error {
|
||||
func (o *ConfigMapOptions) Run() error {
|
||||
configMap, err := o.createConfigMap()
|
||||
if err != nil {
|
||||
return nil
|
||||
return err
|
||||
}
|
||||
if err := util.CreateOrUpdateAnnotation(o.CreateAnnotation, configMap, scheme.DefaultJSONEncoder()); err != nil {
|
||||
return err
|
||||
|
Loading…
Reference in New Issue
Block a user