Commit e9618b0d authored by Mitchell Hashimoto's avatar Mitchell Hashimoto

packer/plugin: Properly supports Artifacts

parent caa2b771
......@@ -22,13 +22,13 @@ func (b *cmdBuilder) Prepare(config interface{}) error {
return b.builder.Prepare(config)
}
func (b *cmdBuilder) Run(ui packer.Ui, hook packer.Hook) {
func (b *cmdBuilder) Run(ui packer.Ui, hook packer.Hook) packer.Artifact {
defer func() {
r := recover()
b.checkExit(r, nil)
}()
b.builder.Run(ui, hook)
return b.builder.Run(ui, hook)
}
func (c *cmdBuilder) checkExit(p interface{}, cb func()) {
......
......@@ -13,7 +13,9 @@ func (helperBuilder) Prepare(interface{}) error {
return nil
}
func (helperBuilder) Run(packer.Ui, packer.Hook) {}
func (helperBuilder) Run(packer.Ui, packer.Hook) packer.Artifact {
return nil
}
func TestBuilder_NoExist(t *testing.T) {
assert := asserts.NewTestingAsserts(t, true)
......
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