command/build: Fix scoping again

This commit is contained in:
Mitchell Hashimoto 2013-06-05 17:51:13 -07:00
parent 81595258be
commit bc670323c7
1 changed files with 2 additions and 2 deletions

View File

@ -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()