update comment

Signed-off-by: Lyndon Shi <shilyndon@outlook.com>
pull/12495/head
Lyndon Shi 2 years ago
parent a7bd420747
commit ca2390a181

@ -39,8 +39,9 @@ func (cfg *Configuration) execHook(rl *release.Release, hook release.HookEvent,
} }
} }
// hooke are pre-ordered by kind, so keep order stable // Since we want to sort by name among hooks of the same kind, we need to re-sort and can't use
sort.Stable(hookByWeight(executingHooks)) // Stable() and rely on the existing sort by kind.
sort.Sort(hookByWeight(executingHooks))
for _, h := range executingHooks { for _, h := range executingHooks {
// Set default delete policy to before-hook-creation // Set default delete policy to before-hook-creation

Loading…
Cancel
Save