mirror of
https://github.com/psviderski/uncloud.git
synced 2026-08-26 19:13:34 +00:00
feat(pre-deploy): include timeout information in pre-deploy hook formatting in plan
This commit is contained in:
@@ -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()
|
||||||
|
|||||||
Reference in New Issue
Block a user