mirror of https://github.com/docker/compose.git
progress: Stop event on error
Ensures that we set an `endTime` when an error event is published. Signed-off-by: Christopher Crone <christopher.crone@docker.com>
This commit is contained in:
parent
8ad53088a3
commit
9cc04472fb
|
@ -68,9 +68,12 @@ func (w *ttyWriter) Event(e Event) {
|
|||
}
|
||||
if _, ok := w.events[e.ID]; ok {
|
||||
event := w.events[e.ID]
|
||||
if event.Status != Done && e.Status == Done {
|
||||
switch e.Status {
|
||||
case Done, Error:
|
||||
if event.Status != e.Status {
|
||||
event.stop()
|
||||
}
|
||||
}
|
||||
event.Status = e.Status
|
||||
event.Text = e.Text
|
||||
event.StatusText = e.StatusText
|
||||
|
|
Loading…
Reference in New Issue