mirror of
https://github.com/hashicorp/packer.git
synced 2026-06-10 17:20:26 -04:00
display received signal in debug mode
This commit is contained in:
parent
2bfd1f7c74
commit
045f2f41bd
1 changed files with 2 additions and 2 deletions
|
|
@ -159,12 +159,12 @@ func (c *BuildCommand) Run(args []string) int {
|
|||
signal.Notify(sigCh, os.Interrupt, syscall.SIGTERM)
|
||||
defer signal.Stop(sigCh)
|
||||
go func(b packer.Build) {
|
||||
<-sigCh
|
||||
sig := <-sigCh
|
||||
interruptWg.Add(1)
|
||||
defer interruptWg.Done()
|
||||
interrupted = true
|
||||
|
||||
log.Printf("Stopping build: %s", b.Name())
|
||||
log.Printf("Stopping build: %s after receiving %s", b.Name(), sig)
|
||||
b.Cancel()
|
||||
//cancelCtx()
|
||||
log.Printf("Build cancelled: %s", b.Name())
|
||||
|
|
|
|||
Loading…
Reference in a new issue