build: use copy for BuildWithResultHandler loop vars

Signed-off-by: Justin Chadwell <me@jedevc.com>
pull/1504/head
Justin Chadwell 2 years ago
parent fb27e3f919
commit 347417ee12

@ -1072,7 +1072,7 @@ func BuildWithResultHandler(ctx context.Context, nodes []builder.Node, opt map[s
})
for i, dp := range dps {
so := *dp.so
i, dp, so := i, dp, *dp.so
if multiDriver {
for i, e := range so.Exports {
switch e.Type {
@ -1101,7 +1101,6 @@ func BuildWithResultHandler(ctx context.Context, nodes []builder.Node, opt map[s
}
}
func(i int, dp driverPair, so client.SolveOpt) {
pw := progress.WithPrefix(w, k, multiTarget)
c := clients[dp.driverIndex]
@ -1237,8 +1236,6 @@ func BuildWithResultHandler(ctx context.Context, nodes []builder.Node, opt map[s
}
return nil
})
}(i, dp, so)
}
return nil

Loading…
Cancel
Save