mirror of
https://gitea.com/Lydanne/buildx.git
synced 2025-07-04 10:27:43 +08:00
build: fix scoping issue in closure inside loop
Signed-off-by: Tibor Vass <tibor@docker.com>
This commit is contained in:
parent
299d41660b
commit
63e5633d62
@ -541,7 +541,7 @@ func Build(ctx context.Context, drivers []DriverInfo, opt map[string]Options, do
|
||||
multiTarget := len(opt) > 1
|
||||
|
||||
for k, opt := range opt {
|
||||
err := func() error {
|
||||
err := func(k string) error {
|
||||
opt := opt
|
||||
dps := m[k]
|
||||
multiDriver := len(m[k]) > 1
|
||||
@ -685,7 +685,7 @@ func Build(ctx context.Context, drivers []DriverInfo, opt map[string]Options, do
|
||||
}
|
||||
|
||||
return nil
|
||||
}()
|
||||
}(k)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user