File tree Expand file tree Collapse file tree 1 file changed +11
-7
lines changed
Expand file tree Collapse file tree 1 file changed +11
-7
lines changed Original file line number Diff line number Diff line change @@ -178,7 +178,9 @@ func (w *ttyWriter) Done(operation string, success bool) {
178178 w .print ()
179179 w .mtx .Lock ()
180180 defer w .mtx .Unlock ()
181- w .ticker .Stop ()
181+ if w .ticker != nil {
182+ w .ticker .Stop ()
183+ }
182184 w .operation = ""
183185 w .done <- true
184186}
@@ -202,12 +204,14 @@ func (w *ttyWriter) On(events ...api.Resource) {
202204
203205func (w * ttyWriter ) event (e api.Resource ) {
204206 // Suspend print while a build is in progress, to avoid collision with buildkit Display
205- if e .Text == api .StatusBuilding {
206- w .ticker .Stop ()
207- w .suspended = true
208- } else if w .suspended {
209- w .ticker .Reset (100 * time .Millisecond )
210- w .suspended = false
207+ if w .ticker != nil {
208+ if e .Text == api .StatusBuilding {
209+ w .ticker .Stop ()
210+ w .suspended = true
211+ } else if w .suspended {
212+ w .ticker .Reset (100 * time .Millisecond )
213+ w .suspended = false
214+ }
211215 }
212216
213217 if last , ok := w .tasks [e .ID ]; ok {
You can’t perform that action at this time.
0 commit comments