feat(pre-deploy): correct progress events for pre-deploy hooks, make other container events more aligned with plan

This commit is contained in:
Pasha Sviderski
2026-04-08 19:16:42 +10:00
parent 0e820f9c52
commit 0da9df17a4
8 changed files with 110 additions and 27 deletions
+10
View File
@@ -51,3 +51,13 @@ func IsStdinTerminal() bool {
func IsStdoutTerminal() bool {
return term.IsTerminal(int(os.Stdout.Fd()))
}
// TerminalWidth returns the width of the terminal.
// Returns 0 if stdout is not a terminal or the width cannot be determined.
func TerminalWidth() int {
width, _, err := term.GetSize(int(os.Stdout.Fd()))
if err != nil || width <= 0 {
return 0
}
return width
}