mirror of
https://github.com/hashicorp/packer.git
synced 2026-09-29 19:24:10 -04:00
nil signals are probably just a cancellation in disguise
This commit is contained in:
@@ -38,6 +38,11 @@ func (c *BuildCommand) Run(args []string) int {
|
||||
go func() {
|
||||
select {
|
||||
case sig := <-sigCh:
|
||||
if sig == nil {
|
||||
// context got cancelled and this closed chan probably
|
||||
// triggered first
|
||||
return
|
||||
}
|
||||
c.Ui.Error(fmt.Sprintf("Cancelling build after receiving %s", sig))
|
||||
cancelBuildCtx()
|
||||
case <-buildCtx.Done():
|
||||
|
||||
Reference in New Issue
Block a user