Merge pull request #7379 from mitchellh/sethvargo/update_uniq

core/boxes: Do not update the same box twice
This commit is contained in:
Seth Vargo 2016-06-04 21:22:06 +02:00
commit b3cabe0180
1 changed files with 10 additions and 0 deletions

View File

@ -86,6 +86,8 @@ module VagrantPlugins
end
def update_vms(argv, provider, download_options)
machines = {}
with_target_vms(argv, provider: provider) do |machine|
if !machine.config.vm.box
machine.ui.output(I18n.t(
@ -100,6 +102,14 @@ module VagrantPlugins
next
end
name = machine.box.name
provider = machine.box.provider
version = machine.config.vm.box_version || machine.box.version
machines["#{name}_#{provider}_#{version}"] = machine
end
machines.each do |_, machine|
box = machine.box
version = machine.config.vm.box_version
# Get download options from machine configuration if not specified