فهرست منبع

Merge pull request #9476 from maxcleme/9469-fix-flickering-prompt

fix: prevent flickering prompt when pulling same image from N services
Guillaume Lours 3 سال پیش
والد
کامیت
285a9c94f7
1فایلهای تغییر یافته به همراه4 افزوده شده و 1 حذف شده
  1. 4 1
      pkg/progress/tty.go

+ 4 - 1
pkg/progress/tty.go

@@ -83,7 +83,10 @@ func (w *ttyWriter) Event(e Event) {
 		last.Status = e.Status
 		last.Text = e.Text
 		last.StatusText = e.StatusText
-		last.ParentID = e.ParentID
+		// allow set/unset of parent, but not swapping otherwise prompt is flickering
+		if last.ParentID == "" || e.ParentID == "" {
+			last.ParentID = e.ParentID
+		}
 		w.events[e.ID] = last
 	} else {
 		e.startTime = time.Now()