Commit 0ba17a1a authored by Mitchell Hashimoto's avatar Mitchell Hashimoto

builder/virtualbox: Don't validate guest additions URL so early because it requires template

parent eb02dad1
......@@ -226,14 +226,6 @@ func (b *Builder) Prepare(raws ...interface{}) error {
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 _, err := os.Stat(b.config.OutputDir); err == nil {
errs = packer.MultiErrorAppend(
......
......@@ -92,6 +92,14 @@ func (s *stepDownloadGuestAdditions) Run(state map[string]interface{}) multistep
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("Acquiring lock to download the guest additions ISO.")
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment