Commit 42005959 authored by Mitchell Hashimoto's avatar Mitchell Hashimoto

packer: Don't run post-processors if artifact is nil

parent 330e3405
......@@ -161,6 +161,12 @@ func (b *coreBuild) Run(ui Ui, cache Cache) ([]Artifact, error) {
return nil, err
}
// If there was no result, don't worry about running post-processors
// because there is nothing they can do, just return.
if builderArtifact == nil {
return nil, nil
}
errors := make([]error, 0)
keepOriginalArtifact := len(b.postProcessors) == 0
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment