feat(pre-deploy): include timeout information in pre-deploy hook formatting in plan

This commit is contained in:
Pasha Sviderski
2026-04-08 19:16:42 +10:00
parent fe813302b7
commit 043b85ab70
+7 -1
View File
@@ -167,12 +167,18 @@ func (o *RunPreDeployOperation) waitForExit(
func (o *RunPreDeployOperation) Format() string { func (o *RunPreDeployOperation) Format() string {
cmd := strings.Join(o.Spec.PreDeploy.Command, " ") cmd := strings.Join(o.Spec.PreDeploy.Command, " ")
timeout := DefaultPreDeployTimeout
if o.Spec.PreDeploy.Timeout != nil {
timeout = *o.Spec.PreDeploy.Timeout
}
prefix := tui.BoldGreen.Render("▶") + " " + prefix := tui.BoldGreen.Render("▶") + " " +
tui.Faint.Render("run pre-deploy hook") + " " + tui.Faint.Render("run pre-deploy hook") + " " +
o.Spec.Name + " [" o.Spec.Name + " ["
suffix := "] " + suffix := "] " +
tui.Faint.Render("on") + " " + 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. // Truncate the command to fit within the terminal width.
termWidth := tui.TerminalWidth() termWidth := tui.TerminalWidth()