From dcede42172175dee3d6388da15d57771010aa94c Mon Sep 17 00:00:00 2001 From: Stefan Bueringer Date: Fri, 10 Jan 2025 13:53:38 +0100 Subject: [PATCH] Fix formatting of blocking lifecycle hook condition message MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Stefan Büringer buringerst@vmware.com --- exp/topology/scope/hookresponsetracker.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/exp/topology/scope/hookresponsetracker.go b/exp/topology/scope/hookresponsetracker.go index e66a3ac718ec..cf7cb2ca7473 100644 --- a/exp/topology/scope/hookresponsetracker.go +++ b/exp/topology/scope/hookresponsetracker.go @@ -91,7 +91,11 @@ func (h *HookResponseTracker) AggregateMessage() string { hookAndMessages := []string{} for hook, message := range blockingHooks { - hookAndMessages = append(hookAndMessages, fmt.Sprintf("hook %q is blocking: %s", hook, message)) + if message == "" { + hookAndMessages = append(hookAndMessages, fmt.Sprintf("hook %q is blocking", hook)) + } else { + hookAndMessages = append(hookAndMessages, fmt.Sprintf("hook %q is blocking: %s", hook, message)) + } } return strings.Join(hookAndMessages, "; ") }