nil signals are probably just a cancellation in disguise
This commit is contained in:
parent
583d93790f
commit
af15ed3583
|
@ -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():
|
||||
|
|
Loading…
Reference in New Issue