Skip to content

Commit

Permalink
fix: remove module from status line (#2907)
Browse files Browse the repository at this point in the history
fixes #2900
  • Loading branch information
stuartwdouglas authored Sep 30, 2024
1 parent dce6a18 commit 6275fac
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion internal/terminal/status.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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 {
Expand Down

0 comments on commit 6275fac

Please sign in to comment.