fix checksum verification for downloaded boxes (fixes #4665)

This makes sure that config.vm.box_download_checksum and
config.vm.box_download_checksum_type get passed to
Vagrant::Action.action_box_add with other options on
box download/import.
This commit is contained in:
Simon Vetter 2015-01-20 14:28:29 +01:00
parent 4cd767afcc
commit 40eb978931
1 changed files with 4 additions and 0 deletions

View File

@ -64,6 +64,8 @@ module Vagrant
box_download_ca_path = machine.config.vm.box_download_ca_path
box_download_client_cert = machine.config.vm.box_download_client_cert
box_download_insecure = machine.config.vm.box_download_insecure
box_download_checksum_type = machine.config.vm.box_download_checksum_type
box_download_checksum = machine.config.vm.box_download_checksum
box_formats = machine.provider_options[:box_format] ||
machine.provider_name
@ -86,6 +88,8 @@ module Vagrant
box_download_ca_cert: box_download_ca_cert,
box_download_ca_path: box_download_ca_path,
box_download_insecure: box_download_insecure,
box_checksum_type: box_download_checksum_type,
box_checksum: box_download_checksum,
}))
rescue Errors::BoxAlreadyExists
# Just ignore this, since it means the next part will succeed!