From 043b85ab704b007e2cb3052b6af898d67599f6a9 Mon Sep 17 00:00:00 2001 From: Pasha Sviderski Date: Tue, 7 Apr 2026 20:48:06 +1000 Subject: [PATCH] feat(pre-deploy): include timeout information in pre-deploy hook formatting in plan --- pkg/client/deploy/operation/predeploy.go | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/pkg/client/deploy/operation/predeploy.go b/pkg/client/deploy/operation/predeploy.go index bdccd2e4..54a61f91 100644 --- a/pkg/client/deploy/operation/predeploy.go +++ b/pkg/client/deploy/operation/predeploy.go @@ -167,12 +167,18 @@ func (o *RunPreDeployOperation) waitForExit( func (o *RunPreDeployOperation) Format() string { cmd := strings.Join(o.Spec.PreDeploy.Command, " ") + timeout := DefaultPreDeployTimeout + if o.Spec.PreDeploy.Timeout != nil { + timeout = *o.Spec.PreDeploy.Timeout + } + prefix := tui.BoldGreen.Render("▶") + " " + tui.Faint.Render("run pre-deploy hook") + " " + o.Spec.Name + " [" suffix := "] " + tui.Faint.Render("on") + " " + - o.MachineName + o.MachineName + " " + + tui.Yellow.Render(fmt.Sprintf("(timeout %s)", timeout)) // Truncate the command to fit within the terminal width. termWidth := tui.TerminalWidth()