fix issue(#52994)kubectl set resource can not update multi resource in local

This commit is contained in:
zhengjiajin
2017-10-26 15:33:22 +08:00
parent 2ea306a854
commit dd9ab89e31
7 changed files with 170 additions and 3 deletions

View File

@@ -238,7 +238,10 @@ func (o *ResourcesOptions) Run() error {
}
if o.Local || cmdutil.GetDryRunFlag(o.Cmd) {
return o.PrintObject(o.Cmd, o.Local, o.Mapper, info.Object, o.Out)
if err := o.PrintObject(o.Cmd, o.Local, o.Mapper, info.Object, o.Out); err != nil {
return err
}
continue
}
obj, err := resource.NewHelper(info.Client, info.Mapping).Patch(info.Namespace, info.Name, types.StrategicMergePatchType, patch.Patch)