From 5b27d5a9f649082f1ed1622e347dcf904dbb45bf Mon Sep 17 00:00:00 2001 From: Justin Chadwell Date: Wed, 31 May 2023 15:13:00 +0100 Subject: [PATCH] build: cleanup res if returned in basic build In practice, this shouldn't happen, but the check is good to include anyways. Signed-off-by: Justin Chadwell --- commands/build.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/commands/build.go b/commands/build.go index 3467e463..231283c3 100644 --- a/commands/build.go +++ b/commands/build.go @@ -297,7 +297,10 @@ func runBuild(dockerCli command.Cli, options buildOptions) (err error) { } func runBasicBuild(ctx context.Context, dockerCli command.Cli, opts *controllerapi.BuildOptions, options buildOptions, printer *progress.Printer) (*client.SolveResponse, error) { - resp, _, err := cbuild.RunBuild(ctx, dockerCli, *opts, os.Stdin, printer, false) + resp, res, err := cbuild.RunBuild(ctx, dockerCli, *opts, os.Stdin, printer, false) + if res != nil { + res.Done() + } return resp, err }