packer/plugin: fix crash case, nil function call [GH-2098]

This commit is contained in:
Mitchell Hashimoto 2015-05-29 11:30:56 -07:00
parent 2eff9c5357
commit f259e7352a
2 changed files with 2 additions and 1 deletions

View File

@ -12,6 +12,7 @@ IMPROVEMENTS:
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: Retry finding created instance for eventual
consistency. [GH-2129]

View File

@ -29,7 +29,7 @@ func (c *cmdPostProcessor) PostProcess(ui packer.Ui, a packer.Artifact) (packer.
}
func (c *cmdPostProcessor) checkExit(p interface{}, cb func()) {
if c.client.Exited() {
if c.client.Exited() && cb != nil {
cb()
} else if p != nil && !Killed {
log.Panic(p)