Check for error after runner completes (#9925)
This commit is contained in:
parent
5ca9f6539f
commit
2837d56885
|
@ -218,6 +218,9 @@ func (p *PostProcessor) PostProcess(ctx context.Context, ui packer.Ui, artifact
|
||||||
// Run the steps.
|
// Run the steps.
|
||||||
p.runner = common.NewRunner(steps, p.config.PackerConfig, ui)
|
p.runner = common.NewRunner(steps, p.config.PackerConfig, ui)
|
||||||
p.runner.Run(ctx, state)
|
p.runner.Run(ctx, state)
|
||||||
|
if rawErr, ok := state.GetOk("error"); ok {
|
||||||
|
return nil, false, false, rawErr.(error)
|
||||||
|
}
|
||||||
|
|
||||||
result := &Artifact{
|
result := &Artifact{
|
||||||
paths: p.config.Paths,
|
paths: p.config.Paths,
|
||||||
|
|
Loading…
Reference in New Issue