mirror of
https://github.com/hashicorp/packer.git
synced 2026-04-28 01:28:29 -04:00
packer: Don't run post-processors if artifact is nil
This commit is contained in:
parent
0836c46e64
commit
8d638aaa75
1 changed files with 6 additions and 0 deletions
|
|
@ -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
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue