builder/virtualbox: Don't validate guest additions URL so early because it requires template
This commit is contained in:
parent
eb02dad16c
commit
0ba17a1a50
|
@ -226,14 +226,6 @@ func (b *Builder) Prepare(raws ...interface{}) error {
|
||||||
b.config.GuestAdditionsSHA256 = strings.ToLower(b.config.GuestAdditionsSHA256)
|
b.config.GuestAdditionsSHA256 = strings.ToLower(b.config.GuestAdditionsSHA256)
|
||||||
}
|
}
|
||||||
|
|
||||||
if b.config.GuestAdditionsURL != "" {
|
|
||||||
b.config.GuestAdditionsURL, err = common.DownloadableURL(b.config.GuestAdditionsURL)
|
|
||||||
if err != nil {
|
|
||||||
errs = packer.MultiErrorAppend(
|
|
||||||
errs, fmt.Errorf("guest_additions_url: %s", err))
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if !b.config.PackerForce {
|
if !b.config.PackerForce {
|
||||||
if _, err := os.Stat(b.config.OutputDir); err == nil {
|
if _, err := os.Stat(b.config.OutputDir); err == nil {
|
||||||
errs = packer.MultiErrorAppend(
|
errs = packer.MultiErrorAppend(
|
||||||
|
|
|
@ -92,6 +92,14 @@ func (s *stepDownloadGuestAdditions) Run(state map[string]interface{}) multistep
|
||||||
additionsName)
|
additionsName)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
url, err = common.DownloadableURL(url)
|
||||||
|
if err != nil {
|
||||||
|
err := fmt.Errorf("Error preparing guest additions url: %s", err)
|
||||||
|
state["error"] = err
|
||||||
|
ui.Error(err.Error())
|
||||||
|
return multistep.ActionHalt
|
||||||
|
}
|
||||||
|
|
||||||
log.Printf("Guest additions URL: %s", url)
|
log.Printf("Guest additions URL: %s", url)
|
||||||
|
|
||||||
log.Printf("Acquiring lock to download the guest additions ISO.")
|
log.Printf("Acquiring lock to download the guest additions ISO.")
|
||||||
|
|
Loading…
Reference in New Issue