mirror of
https://github.com/helm/helm.git
synced 2026-04-07 10:05:01 -04:00
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:
parent
5367001f4f
commit
3cd6afe845
1 changed files with 3 additions and 1 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Reference in a new issue