add short circuit return

Co-authored-by: George Jenkins <gvjenkins@gmail.com>
Signed-off-by: Scott Rigby <scott@r6by.com>
This commit is contained in:
Scott Rigby 2025-02-20 12:36:11 -05:00
parent 5367001f4f
commit 3cd6afe845
No known key found for this signature in database
GPG key ID: C7C6FBB5B91C1155

View file

@ -181,7 +181,9 @@ func hookHasDeletePolicy(h *release.Hook, policy release.HookDeletePolicy) bool
// outputLogsByPolicy outputs a pods logs if the hook policy instructs it to
func (cfg *Configuration) outputLogsByPolicy(h *release.Hook, releaseNamespace string, policy release.HookOutputLogPolicy) error {
if hookHasOutputLogPolicy(h, policy) {
if !hookHasOutputLogPolicy(h, policy) {
return nil
}
namespace, err := cfg.deriveNamespace(h, releaseNamespace)
if err != nil {
return err