mirror of
https://gitea.com/Lydanne/buildx.git
synced 2025-05-18 00:47:48 +08:00
bake: fix printer reset before metadata written
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
This commit is contained in:
parent
35313e865f
commit
cc097db675
@ -302,7 +302,6 @@ func runBake(ctx context.Context, dockerCli command.Cli, targets []string, in ba
|
||||
}
|
||||
|
||||
err = printer.Wait()
|
||||
printer = nil
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
@ -22,6 +22,7 @@ type Printer struct {
|
||||
ready chan struct{}
|
||||
done chan struct{}
|
||||
paused chan struct{}
|
||||
closeOnce sync.Once
|
||||
|
||||
err error
|
||||
warnings []client.VertexWarning
|
||||
@ -36,8 +37,10 @@ type Printer struct {
|
||||
}
|
||||
|
||||
func (p *Printer) Wait() error {
|
||||
p.closeOnce.Do(func() {
|
||||
close(p.status)
|
||||
<-p.done
|
||||
})
|
||||
return p.err
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user