From e584c6e1a7efba49cdde4f54e34e828da8c66312 Mon Sep 17 00:00:00 2001 From: Justin Chadwell Date: Fri, 16 Dec 2022 12:19:33 +0000 Subject: [PATCH] build: check error from toSolveOpt before adding FrontendAttrs Signed-off-by: Justin Chadwell --- build/build.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/build/build.go b/build/build.go index bfd32cd4..1fc679b7 100644 --- a/build/build.go +++ b/build/build.go @@ -861,12 +861,12 @@ func BuildWithResultHandler(ctx context.Context, nodes []builder.Node, opt map[s so, release, err := toSolveOpt(ctx, node, multiDriver, opt, np.bopts, configDir, w, func(name string) (io.WriteCloser, func(), error) { return docker.LoadImage(ctx, name, w) }) - for k, v := range gitattrs { - so.FrontendAttrs[k] = v - } if err != nil { return nil, err } + for k, v := range gitattrs { + so.FrontendAttrs[k] = v + } defers = append(defers, release) m[k][i].so = so }