mirror of
https://gitea.com/Lydanne/buildx.git
synced 2025-05-18 09:17:49 +08:00
bake: check printer before printing warnings
Signed-off-by: CrazyMax <1951866+crazy-max@users.noreply.github.com> (cherry picked from commit 7823a2dc0112caeb1d82ba523a89b9aa96abedc7)
This commit is contained in:
parent
10c9ff901c
commit
fb773fa805
@ -146,7 +146,9 @@ func runBake(ctx context.Context, dockerCli command.Cli, targets []string, in ba
|
|||||||
printer, err = progress.NewPrinter(ctx2, os.Stderr, progressMode,
|
printer, err = progress.NewPrinter(ctx2, os.Stderr, progressMode,
|
||||||
progress.WithDesc(progressTextDesc, progressConsoleDesc),
|
progress.WithDesc(progressTextDesc, progressConsoleDesc),
|
||||||
progress.WithOnClose(func() {
|
progress.WithOnClose(func() {
|
||||||
printWarnings(os.Stderr, printer.Warnings(), progressMode)
|
if p := printer; p != nil {
|
||||||
|
printWarnings(os.Stderr, p.Warnings(), progressMode)
|
||||||
|
}
|
||||||
}),
|
}),
|
||||||
)
|
)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user