buidler/vsphere-iso: ISOUrl Fix (#9321)

* 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.
This commit is contained in:
RedTail72 2020-06-01 15:27:26 -04:00 committed by GitHub
parent 226f817229
commit 374f82b978
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 5 additions and 3 deletions

View File

@ -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()...)