Merge pull request #1479 from jedevc/fixup-git-err-check-order

build: check error from toSolveOpt before adding FrontendAttrs
pull/1480/head
CrazyMax 2 years ago committed by GitHub
commit c93c02df85
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -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
}

Loading…
Cancel
Save