diff --git a/pkg/action/install.go b/pkg/action/install.go index 425b66f69..cadfe37eb 100644 --- a/pkg/action/install.go +++ b/pkg/action/install.go @@ -378,6 +378,22 @@ func (i *Install) performInstall(c chan<- resultMessage, rel *release.Release, t return } } + + if !i.Wait && !i.DisableHooks { + // Check if there are any post-* hooks + hasPostHooks := false + for _, hook := range release.Hooks { + if strings.HasPrefix(hook.Kind, "post-") { + hasPostHooks = true + break + } + } + + // Enable wait flag if there are post-* hooks + if hasPostHooks { + i.Wait = true + } + } if i.Wait { if i.WaitForJobs { @@ -400,6 +416,7 @@ func (i *Install) performInstall(c chan<- resultMessage, rel *release.Release, t } } + if len(i.Description) > 0 { rel.SetStatus(release.StatusDeployed, i.Description) } else {