fix(action): return nil if no errors occurred

Signed-off-by: Matthew Fisher <matt.fisher@microsoft.com>
This commit is contained in:
Matthew Fisher
2019-08-08 15:54:26 -07:00
parent affd77558f
commit 6e7f5e64a0

View File

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