From 2837d56885b6bf0c5a2f7b99ddbfc1fa0d013b0a Mon Sep 17 00:00:00 2001 From: GennadySpb Date: Fri, 11 Sep 2020 12:14:49 +0300 Subject: [PATCH] Check for error after runner completes (#9925) --- post-processor/yandex-export/post-processor.go | 3 +++ 1 file changed, 3 insertions(+) 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,