packer/plugin: fix nil deref during ctrl-c of provisioner
This commit is contained in:
parent
87f47ba6de
commit
332d666180
|
@ -1,6 +1,8 @@
|
||||||
## 0.3.6 (unreleased)
|
## 0.3.6 (unreleased)
|
||||||
|
|
||||||
|
BUG FIXES:
|
||||||
|
|
||||||
|
* core: Fix possible panic when ctrl-C during provisioner run.
|
||||||
|
|
||||||
## 0.3.5 (August 28, 2013)
|
## 0.3.5 (August 28, 2013)
|
||||||
|
|
||||||
|
|
|
@ -29,7 +29,7 @@ func (c *cmdProvisioner) Provision(ui packer.Ui, comm packer.Communicator) error
|
||||||
}
|
}
|
||||||
|
|
||||||
func (c *cmdProvisioner) checkExit(p interface{}, cb func()) {
|
func (c *cmdProvisioner) checkExit(p interface{}, cb func()) {
|
||||||
if c.client.Exited() {
|
if c.client.Exited() && cb != nil {
|
||||||
cb()
|
cb()
|
||||||
} else if p != nil && !Killed {
|
} else if p != nil && !Killed {
|
||||||
log.Panic(p)
|
log.Panic(p)
|
||||||
|
|
Loading…
Reference in New Issue