packer/plugin: Properly supports Artifacts
This commit is contained in:
parent
caa2b7711b
commit
e9618b0d07
|
@ -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)
|
||||
|
|
Loading…
Reference in New Issue