diff --git a/builder/virtualbox/common/step_export.go b/builder/virtualbox/common/step_export.go index d633ee89e..279af84db 100644 --- a/builder/virtualbox/common/step_export.go +++ b/builder/virtualbox/common/step_export.go @@ -31,14 +31,14 @@ func (s *StepExport) Run(_ context.Context, state multistep.StateBag) multistep. // If ISO export is configured, ensure this option is propagated to VBoxManage. if s.Bundling.BundleISO { foundISOOption := false - + for _, option := range s.ExportOpts { if option == "--iso" || option == "-I" { foundISOOption = true break } } - + if !foundISOOption { s.ExportOpts = append(s.ExportOpts, "--iso") } diff --git a/builder/virtualbox/common/step_remove_devices.go b/builder/virtualbox/common/step_remove_devices.go index 306243721..461705763 100644 --- a/builder/virtualbox/common/step_remove_devices.go +++ b/builder/virtualbox/common/step_remove_devices.go @@ -19,7 +19,7 @@ import ( // vmName string // // Produces: -type StepRemoveDevices struct{ +type StepRemoveDevices struct { Bundling VBoxBundleConfig } diff --git a/builder/virtualbox/common/vboxbundle_config.go b/builder/virtualbox/common/vboxbundle_config.go index 9b4ad3391..944646aca 100644 --- a/builder/virtualbox/common/vboxbundle_config.go +++ b/builder/virtualbox/common/vboxbundle_config.go @@ -5,7 +5,7 @@ import ( ) type VBoxBundleConfig struct { - BundleISO bool `mapstructure:"bundle_iso"` + BundleISO bool `mapstructure:"bundle_iso"` } func (c *VBoxBundleConfig) Prepare(ctx *interpolate.Context) []error { diff --git a/builder/virtualbox/common/vboxbundle_config_test.go b/builder/virtualbox/common/vboxbundle_config_test.go index 8aa9833fb..80cc47961 100644 --- a/builder/virtualbox/common/vboxbundle_config_test.go +++ b/builder/virtualbox/common/vboxbundle_config_test.go @@ -26,7 +26,7 @@ func TestVBoxBundleConfigPrepare_VBoxBundle(t *testing.T) { } expected := VBoxBundleConfig{ - BundleISO: true, + BundleISO: true, } if !reflect.DeepEqual(c, expected) {