mirror of https://github.com/docker/buildx.git
bake: check printer before printing warnings
Signed-off-by: CrazyMax <1951866+crazy-max@users.noreply.github.com>
This commit is contained in:
parent
3005743f7c
commit
7823a2dc01
|
@ -146,7 +146,9 @@ func runBake(ctx context.Context, dockerCli command.Cli, targets []string, in ba
|
|||
printer, err = progress.NewPrinter(ctx2, os.Stderr, progressMode,
|
||||
progress.WithDesc(progressTextDesc, progressConsoleDesc),
|
||||
progress.WithOnClose(func() {
|
||||
printWarnings(os.Stderr, printer.Warnings(), progressMode)
|
||||
if p := printer; p != nil {
|
||||
printWarnings(os.Stderr, p.Warnings(), progressMode)
|
||||
}
|
||||
}),
|
||||
)
|
||||
if err != nil {
|
||||
|
|
Loading…
Reference in New Issue