Browse Source

Fix display glitch when sending a single “Done” event with no previous “Working” event ont he same ID

Signed-off-by: Guillaume Tardif <[email protected]>
Guillaume Tardif 4 years ago
parent
commit
ec302a2e10
1 changed files with 3 additions and 0 deletions
  1. 3 0
      api/progress/tty.go

+ 3 - 0
api/progress/tty.go

@@ -84,6 +84,9 @@ func (w *ttyWriter) Event(e Event) {
 	} else {
 		e.startTime = time.Now()
 		e.spinner = newSpinner()
+		if e.Status == Done || e.Status == Error {
+			e.stop()
+		}
 		w.events[e.ID] = e
 	}
 }