Skip to content

Commit

Permalink
buidler/vsphere-iso: ISOUrl Fix (hashicorp#9321)
Browse files Browse the repository at this point in the history
* ISOUrl Fix

Added the check for ISOUrls back in addition to a check for RawSingleISOUrl.  This should allow both ISOUrls[] or ISOUrl to work while not requiring them all the time.

* Update config.go

Fixed formatting.
  • Loading branch information
RedTail72 authored Jun 1, 2020
1 parent 226f817 commit 374f82b
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions builder/vsphere/iso/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -63,9 +63,11 @@ func (c *Config) Prepare(raws ...interface{}) ([]string, error) {
warnings := make([]string, 0)
errs := new(packer.MultiError)

isoWarnings, isoErrs := c.ISOConfig.Prepare(&c.ctx)
warnings = append(warnings, isoWarnings...)
errs = packer.MultiErrorAppend(errs, isoErrs...)
if c.ISOUrls != nil || c.RawSingleISOUrl != "" {
isoWarnings, isoErrs := c.ISOConfig.Prepare(&c.ctx)
warnings = append(warnings, isoWarnings...)
errs = packer.MultiErrorAppend(errs, isoErrs...)
}

errs = packer.MultiErrorAppend(errs, c.ConnectConfig.Prepare()...)
errs = packer.MultiErrorAppend(errs, c.CreateConfig.Prepare()...)
Expand Down

0 comments on commit 374f82b

Please sign in to comment.