added check for nil shutdown

Signed-off-by: Michelle Fernandez Bieber <mfbieber@gmail.com>
(cherry picked from commit d9301441f4)
release-4.0
Michelle Fernandez Bieber 4 years ago committed by Scott Rigby
parent 53175b76c7
commit c5d87f2f7d
No known key found for this signature in database
GPG Key ID: C7C6FBB5B91C1155

@ -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