packer: Build only adds post-processor artifact if not nil

This commit is contained in:
Mitchell Hashimoto 2013-06-18 21:15:14 -07:00
parent 6873999620
commit b34bc1a0c9
2 changed files with 4 additions and 2 deletions

View File

@ -175,7 +175,9 @@ PostProcessorRunSeqLoop:
continue PostProcessorRunSeqLoop
}
artifacts = append(artifacts, artifact)
if artifact != nil {
artifacts = append(artifacts, artifact)
}
}
}

View File

@ -18,5 +18,5 @@ func (pp *TestPostProcessor) PostProcess(ui Ui, a Artifact) (Artifact, error) {
pp.ppCalled = true
pp.ppArtifact = a
pp.ppUi = ui
return nil, nil
return new(TestArtifact), nil
}