Skip to content

Commit 1d6019e

Browse files
print final tui update before quitting
1 parent 9175a8e commit 1d6019e

2 files changed

Lines changed: 9 additions & 1 deletion

File tree

src/cmd/cli/command/compose.go

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -193,6 +193,13 @@ func monitorWithUI(ctx context.Context, project *compose.Project, provider clien
193193
}
194194
return nil
195195
})
196+
// empty out all of the service statuses before printing a final state
197+
for name := range serviceStates {
198+
p.Send(serviceUpdate{
199+
name: name,
200+
status: "",
201+
})
202+
}
196203
// Quit the UI when monitoring is done
197204
p.Quit()
198205
}()

src/pkg/cli/getServices.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -220,7 +220,8 @@ func PrintServiceStatesAndEndpoints(serviceEndpoints []ServiceEndpoint) error {
220220
return strings.Compare(a.Endpoint, b.Endpoint)
221221
})
222222

223-
// remove "Service", "Deployment", and "State" columns if they are the same as the previous row
223+
// to reduce noise, print empty "Service", "Deployment", and "State" columns
224+
// if they are for the same service as the previous row
224225
lastService := ""
225226
for i := range serviceEndpoints {
226227
if serviceEndpoints[i].Service == lastService {

0 commit comments

Comments
 (0)