packer/plugin: fix crash case, nil function call [GH-2098]
This commit is contained in:
parent
2eff9c5357
commit
f259e7352a
|
@ -12,6 +12,7 @@ IMPROVEMENTS:
|
||||||
|
|
||||||
BUG FIXES:
|
BUG FIXES:
|
||||||
|
|
||||||
|
* core: Fix potential panic for post-processor plugin exits [GH-2098]
|
||||||
* builder/amazon: Remove deprecated ec2-upload-bundle paramger [GH-1931]
|
* builder/amazon: Remove deprecated ec2-upload-bundle paramger [GH-1931]
|
||||||
* builder/amazon: Retry finding created instance for eventual
|
* builder/amazon: Retry finding created instance for eventual
|
||||||
consistency. [GH-2129]
|
consistency. [GH-2129]
|
||||||
|
|
|
@ -29,7 +29,7 @@ func (c *cmdPostProcessor) PostProcess(ui packer.Ui, a packer.Artifact) (packer.
|
||||||
}
|
}
|
||||||
|
|
||||||
func (c *cmdPostProcessor) checkExit(p interface{}, cb func()) {
|
func (c *cmdPostProcessor) 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