build: use copy for BuildWithResultHandler loop vars

Signed-off-by: Justin Chadwell <me@jedevc.com>
(cherry picked from commit 347417ee12)
pull/1556/head
Justin Chadwell 2 years ago committed by CrazyMax
parent 8c14407fa2
commit f7bd5b99da
No known key found for this signature in database
GPG Key ID: 3248E46B6BB8C7F7

@ -1078,7 +1078,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 {
@ -1107,7 +1107,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]
@ -1243,8 +1242,6 @@ func BuildWithResultHandler(ctx context.Context, nodes []builder.Node, opt map[s
}
return nil
})
}(i, dp, so)
}
return nil

Loading…
Cancel
Save