From 6275fac374ab66a1de5ecfa8b1d3f9dc28f45be0 Mon Sep 17 00:00:00 2001 From: Stuart Douglas Date: Tue, 1 Oct 2024 08:34:51 +1000 Subject: [PATCH] fix: remove module from status line (#2907) fixes #2900 --- internal/terminal/status.go | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/internal/terminal/status.go b/internal/terminal/status.go index 39bb85a85b..1afeda034e 100644 --- a/internal/terminal/status.go +++ b/internal/terminal/status.go @@ -30,6 +30,7 @@ const BuildStateBuilt BuildState = "Built" const BuildStateDeploying BuildState = "Deploying" const BuildStateDeployed BuildState = "Deployed" const BuildStateFailed BuildState = "Failed" +const BuildStateTerminated BuildState = "Terminated" // moduleStatusPadding is the padding between module status entries // it accounts for the icon, the module name, and the padding between them @@ -330,7 +331,11 @@ func (r *terminalStatusManager) SetModuleState(module string, state BuildState) } r.statusLock.Lock() defer r.statusLock.Unlock() - r.moduleStates[module] = state + if state == BuildStateTerminated { + delete(r.moduleStates, module) + } else { + r.moduleStates[module] = state + } if r.moduleLine != nil { r.recalculateLines() } else {