Commit b787d6fb authored by Mitchell Hashimoto's avatar Mitchell Hashimoto

builder/vmware: ESX artifacts have a different builder ID

This is so that things like vagrant post-processors and vsphere
post processors don't work.
parent d3db05c8
......@@ -8,12 +8,13 @@ import (
// Artifact is the result of running the VMware builder, namely a set
// of files associated with the resulting machine.
type Artifact struct {
dir string
f []string
builderId string
dir string
f []string
}
func (*Artifact) BuilderId() string {
return BuilderId
func (a *Artifact) BuilderId() string {
return a.builderId
}
func (a *Artifact) Files() []string {
......
......@@ -16,6 +16,7 @@ import (
)
const BuilderId = "mitchellh.vmware"
const BuilderIdESX = "mitchellh.vmware-esx"
type Builder struct {
config config
......@@ -463,7 +464,17 @@ func (b *Builder) Run(ui packer.Ui, hook packer.Hook, cache packer.Cache) (packe
return nil, err
}
return &Artifact{b.config.OutputDir, files}, nil
// Set the proper builder ID
builderId := BuilderId
if b.config.RemoteType != "" {
builderId = BuilderIdESX
}
return &Artifact{
builderId: builderId,
dir: b.config.OutputDir,
f: files,
}, nil
}
func (b *Builder) Cancel() {
......
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