fix(action): return an error if len > 0

Signed-off-by: Matthew Fisher <matt.fisher@microsoft.com>
This commit is contained in:
Matthew Fisher 2019-08-13 12:10:31 -07:00
parent fddf066121
commit 4c366c972d
No known key found for this signature in database
GPG key ID: 92AA783CBAAE8E3B

View file

@ -116,7 +116,9 @@ func (cfg *Configuration) deleteHookByPolicy(h *release.Hook, policy release.Hoo
return errors.Wrapf(err, "unable to build kubernetes object for deleting hook %s", h.Path)
}
_, errs := cfg.KubeClient.Delete(resources)
return errors.New(joinErrors(errs))
if len(errs) > 0 {
return errors.New(joinErrors(errs))
}
}
return nil
}