fix --local panic in set commands

This commit is contained in:
juanvallejo
2018-06-29 10:36:44 -04:00
parent 98de0729cf
commit e8df247597
6 changed files with 25 additions and 7 deletions

View File

@@ -191,8 +191,9 @@ func (o *SetServiceAccountOptions) Run() error {
patches := CalculatePatches(o.infos, scheme.DefaultJSONEncoder(), patchFn)
for _, patch := range patches {
info := patch.Info
name := info.ObjectName()
if patch.Err != nil {
patchErrs = append(patchErrs, fmt.Errorf("error: %s/%s %v", info.Mapping.Resource, info.Name, patch.Err))
patchErrs = append(patchErrs, fmt.Errorf("error: %s %v\n", name, patch.Err))
continue
}
if o.local || o.dryRun {