This commit is contained in:
Andrew Pennebaker 2018-03-07 11:02:30 -06:00 committed by Megan Marsh
parent 5b6cbeed1d
commit 2c989157e4
4 changed files with 5 additions and 5 deletions

View File

@ -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")
}

View File

@ -19,7 +19,7 @@ import (
// vmName string
//
// Produces:
type StepRemoveDevices struct{
type StepRemoveDevices struct {
Bundling VBoxBundleConfig
}

View File

@ -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 {

View File

@ -26,7 +26,7 @@ func TestVBoxBundleConfigPrepare_VBoxBundle(t *testing.T) {
}
expected := VBoxBundleConfig{
BundleISO: true,
BundleISO: true,
}
if !reflect.DeepEqual(c, expected) {