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

@@ -428,7 +428,10 @@ func (o *EnvOptions) RunEnv(f cmdutil.Factory) error {
}
if len(o.Output) > 0 {
return o.PrintObject(o.Cmd, o.Local, o.Mapper, obj, o.Out)
if err := o.PrintObject(o.Cmd, o.Local, o.Mapper, obj, o.Out); err != nil {
return err
}
continue
}
cmdutil.PrintSuccess(o.Mapper, o.ShortOutput, o.Out, info.Mapping.Resource, info.Name, false, "env updated")