build: fix scoping issue in closure inside loop

Signed-off-by: Tibor Vass <tibor@docker.com>
pull/154/head
Tibor Vass 5 years ago
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…
Cancel
Save