From 9756a9858a82dfd9a5b5f306e8a48920e594752b Mon Sep 17 00:00:00 2001 From: Dax T Games Date: Tue, 4 Feb 2020 14:41:44 -0500 Subject: [PATCH 1/2] Update builder.go --- builder/vsphere/iso/builder.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/builder/vsphere/iso/builder.go b/builder/vsphere/iso/builder.go index 9702cc96a..49b96cae1 100644 --- a/builder/vsphere/iso/builder.go +++ b/builder/vsphere/iso/builder.go @@ -121,7 +121,7 @@ func (b *Builder) Run(ctx context.Context, ui packer.Ui, hook packer.Hook) (pack } steps = append(steps, - &StepRemoveCDRom{ + &StepRemoveCDRom{ Config: &b.config.RemoveCDRomConfig, }, &common.StepCreateSnapshot{ From 6b82bf5a93c4a04a7a2b5499d921f994f4770111 Mon Sep 17 00:00:00 2001 From: "Dax T. Games" Date: Wed, 5 Feb 2020 15:25:49 +0000 Subject: [PATCH 2/2] format --- builder/vsphere/iso/builder.go | 2 +- builder/vsphere/iso/config.go | 2 +- builder/vsphere/iso/step_remove_cdrom.go | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/builder/vsphere/iso/builder.go b/builder/vsphere/iso/builder.go index 49b96cae1..d35a9e3e3 100644 --- a/builder/vsphere/iso/builder.go +++ b/builder/vsphere/iso/builder.go @@ -121,7 +121,7 @@ func (b *Builder) Run(ctx context.Context, ui packer.Ui, hook packer.Hook) (pack } steps = append(steps, - &StepRemoveCDRom{ + &StepRemoveCDRom{ Config: &b.config.RemoveCDRomConfig, }, &common.StepCreateSnapshot{ diff --git a/builder/vsphere/iso/config.go b/builder/vsphere/iso/config.go index 991827c94..63a4eb476 100644 --- a/builder/vsphere/iso/config.go +++ b/builder/vsphere/iso/config.go @@ -24,7 +24,7 @@ type Config struct { packerCommon.ISOConfig `mapstructure:",squash"` CDRomConfig `mapstructure:",squash"` - RemoveCDRomConfig `mapstructure:",squash"` + RemoveCDRomConfig `mapstructure:",squash"` FloppyConfig `mapstructure:",squash"` common.RunConfig `mapstructure:",squash"` BootConfig `mapstructure:",squash"` diff --git a/builder/vsphere/iso/step_remove_cdrom.go b/builder/vsphere/iso/step_remove_cdrom.go index afc09344e..9fd3075a4 100644 --- a/builder/vsphere/iso/step_remove_cdrom.go +++ b/builder/vsphere/iso/step_remove_cdrom.go @@ -26,7 +26,7 @@ func (s *StepRemoveCDRom) Run(_ context.Context, state multistep.StateBag) multi return multistep.ActionHalt } - if s.Config.RemoveCdrom == true { + if s.Config.RemoveCdrom == true { ui.Say("Deleting CD-ROM drives...") err := vm.RemoveCdroms() if err != nil { @@ -35,7 +35,7 @@ func (s *StepRemoveCDRom) Run(_ context.Context, state multistep.StateBag) multi } } - return multistep.ActionContinue + return multistep.ActionContinue } func (s *StepRemoveCDRom) Cleanup(state multistep.StateBag) {}