diff --git a/post-processor/yandex-export/post-processor.go b/post-processor/yandex-export/post-processor.go index 92fa22b12..b2e88df66 100644 --- a/post-processor/yandex-export/post-processor.go +++ b/post-processor/yandex-export/post-processor.go @@ -218,6 +218,9 @@ func (p *PostProcessor) PostProcess(ctx context.Context, ui packer.Ui, artifact // Run the steps. p.runner = common.NewRunner(steps, p.config.PackerConfig, ui) p.runner.Run(ctx, state) + if rawErr, ok := state.GetOk("error"); ok { + return nil, false, false, rawErr.(error) + } result := &Artifact{ paths: p.config.Paths,