mirror of
https://github.com/hashicorp/packer.git
synced 2026-09-29 19:24:10 -04:00
command/build: Fix scoping again
This commit is contained in:
@@ -158,12 +158,12 @@ func (c Command) Run(env packer.Environment, args []string) int {
|
||||
for _, b := range builds {
|
||||
wg.Add(1)
|
||||
|
||||
go func() {
|
||||
go func(b packer.Build) {
|
||||
defer wg.Done()
|
||||
|
||||
log.Printf("Stopping build: %s", b.Name())
|
||||
b.Cancel()
|
||||
}()
|
||||
}(b)
|
||||
}
|
||||
|
||||
wg.Wait()
|
||||
|
||||
Reference in New Issue
Block a user