build: check error from toSolveOpt before adding FrontendAttrs

Signed-off-by: Justin Chadwell <me@jedevc.com>
pull/1479/head
Justin Chadwell 2 years ago
parent 64e4c19971
commit e584c6e1a7

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