From 263f318e82d0b7a34f7a45940399a176bfb6c236 Mon Sep 17 00:00:00 2001 From: Adrien Delorme Date: Thu, 2 May 2019 17:48:34 +0200 Subject: [PATCH] be true to docs --- command/build.go | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/command/build.go b/command/build.go index a05eac662..4602f28c1 100644 --- a/command/build.go +++ b/command/build.go @@ -153,13 +153,12 @@ func (c *BuildCommand) Run(args []string) int { m map[string][]packer.Artifact }{m: make(map[string][]packer.Artifact)} errors := make(map[string]error) - // ctx := context.Background() - if cfgParallel == false { - cfgParallelBuilds = 1 - } if cfgParallelBuilds < 1 { cfgParallelBuilds = math.MaxInt64 } + if cfgParallel == false && cfgParallelBuilds == 0 { + cfgParallelBuilds = 1 + } buildCtx, cancelCtx := context.WithCancel(context.Background()) // Handle interrupts for this build