From 85e74ac95c5c0ee430f7e86c90d25f958897b227 Mon Sep 17 00:00:00 2001 From: Max Proske Date: Mon, 23 Feb 2026 20:10:37 -0800 Subject: [PATCH] Fix panic when watch rebuilds without up Signed-off-by: Max Proske --- cmd/display/tty.go | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/cmd/display/tty.go b/cmd/display/tty.go index 7b624a5cdd..0726ce2704 100644 --- a/cmd/display/tty.go +++ b/cmd/display/tty.go @@ -178,7 +178,9 @@ func (w *ttyWriter) Done(operation string, success bool) { w.print() w.mtx.Lock() defer w.mtx.Unlock() - w.ticker.Stop() + if w.ticker != nil { + w.ticker.Stop() + } w.operation = "" w.done <- true } @@ -202,12 +204,14 @@ func (w *ttyWriter) On(events ...api.Resource) { func (w *ttyWriter) event(e api.Resource) { // Suspend print while a build is in progress, to avoid collision with buildkit Display - if e.Text == api.StatusBuilding { - w.ticker.Stop() - w.suspended = true - } else if w.suspended { - w.ticker.Reset(100 * time.Millisecond) - w.suspended = false + if w.ticker != nil { + if e.Text == api.StatusBuilding { + w.ticker.Stop() + w.suspended = true + } else if w.suspended { + w.ticker.Reset(100 * time.Millisecond) + w.suspended = false + } } if last, ok := w.tasks[e.ID]; ok {