Commit bc670323 authored by Mitchell Hashimoto's avatar Mitchell Hashimoto

command/build: Fix scoping again

parent 81595258
...@@ -158,12 +158,12 @@ func (c Command) Run(env packer.Environment, args []string) int { ...@@ -158,12 +158,12 @@ func (c Command) Run(env packer.Environment, args []string) int {
for _, b := range builds { for _, b := range builds {
wg.Add(1) wg.Add(1)
go func() { go func(b packer.Build) {
defer wg.Done() defer wg.Done()
log.Printf("Stopping build: %s", b.Name()) log.Printf("Stopping build: %s", b.Name())
b.Cancel() b.Cancel()
}() }(b)
} }
wg.Wait() wg.Wait()
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment