File tree Expand file tree Collapse file tree 2 files changed +9
-2
lines changed Expand file tree Collapse file tree 2 files changed +9
-2
lines changed Original file line number Diff line number Diff line change @@ -422,10 +422,13 @@ func BakeCmd() *cobra.Command {
422422 }
423423
424424 // Wait for all builds to complete
425+ fmt .Fprintf (os .Stderr , "**waiting for builds to complete***\n " )
425426 err = eg .Wait ()
426427
427428 // Now wait for the printer to finish and flush all output
429+ fmt .Fprintf (os .Stderr , "**waiting for printer to finish***\n " )
428430 for range projectIDs {
431+ fmt .Fprintf (os .Stderr , "**waiting for one printer Wait***\n " )
429432 _ = printer .Wait ()
430433 }
431434
Original file line number Diff line number Diff line change @@ -2,6 +2,7 @@ package progresshelper
22
33import (
44 "context"
5+ "fmt"
56 "os"
67 "sync"
78 "sync/atomic"
@@ -45,20 +46,23 @@ func NewSharedPrinter(mode string) (*SharedPrinter, error) {
4546// Each call to Add() should be matched with a call to Wait().
4647func (w * SharedPrinter ) Add () {
4748 w .wg .Add (1 )
48- w .numPrinters .Add (1 )
49+ numPrinters := w .numPrinters .Add (1 )
50+ fmt .Fprintf (os .Stderr , "**add done, numPrinters=%d***\n " , numPrinters )
4951}
5052
5153func (w * SharedPrinter ) Wait () error {
5254 w .wg .Done ()
53-
55+ numPrinters := w . numPrinters . Load ()
5456 lastPrinter := w .numPrinters .Add (- 1 ) == 0
57+ fmt .Fprintf (os .Stderr , "**wait done, numPrinters=%d***\n " , numPrinters )
5558
5659 // The docker progress writer will only return an
5760 // error if it is a context cancellation error.
5861 //
5962 // Only the last printer will be the one to stop the docker printer as
6063 // the docker printer closes channels.
6164 if lastPrinter {
65+ fmt .Fprintf (os .Stderr , "**last printer, stopping docker printer***\n " )
6266 w .wg .Wait ()
6367 w .cancel ()
6468 _ = w .printer .Wait ()
You can’t perform that action at this time.
0 commit comments