added check for nil shutdown

Signed-off-by: Michelle Fernandez Bieber <mfbieber@gmail.com>
pull/31579/head
Michelle Fernandez Bieber 4 years ago committed by Benoit Tigeot
parent 7a61ebf013
commit d9301441f4
No known key found for this signature in database
GPG Key ID: 8E6D4FC8AEBDA62C

@ -34,6 +34,9 @@ import (
// execHook executes all of the hooks for the given hook event.
func (cfg *Configuration) execHook(rl *release.Release, hook release.HookEvent, waitStrategy kube.WaitStrategy, timeout time.Duration, serverSideApply bool) error {
shutdown, err := cfg.execHookWithDelayedShutdown(rl, hook, waitStrategy, timeout, serverSideApply)
if shutdown == nil {
return nil
}
if err != nil {
if err := shutdown(); err != nil {
return err

Loading…
Cancel
Save