diff --git a/CHANGELOG.md b/CHANGELOG.md index 742f71567..04bf8d98a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,6 +10,7 @@ - Multiple NFS folders now work on linux. [GH-215] - Add translation for state "stuck" which is very rare. [GH-218] - virtualbox gem dependency minimum raised to 0.7.6 to verify FFI < 1.0.0 is used. + - Fix issue where box downloading from `vagrant up` didn't reload the box collection. [GH-229] ## 0.6.7 (November 3, 2010) diff --git a/lib/vagrant/action/vm/check_box.rb b/lib/vagrant/action/vm/check_box.rb index cf86cbae8..7f80efe49 100644 --- a/lib/vagrant/action/vm/check_box.rb +++ b/lib/vagrant/action/vm/check_box.rb @@ -16,6 +16,7 @@ module Vagrant env.ui.info I18n.t("vagrant.actions.vm.check_box.not_found", :name => box_name) Vagrant::Box.add(env.env, box_name, box_url) + env["boxes"].reload! end @app.call(env) diff --git a/test/vagrant/action/vm/check_box_test.rb b/test/vagrant/action/vm/check_box_test.rb index 9e372d861..453e064b6 100644 --- a/test/vagrant/action/vm/check_box_test.rb +++ b/test/vagrant/action/vm/check_box_test.rb @@ -6,9 +6,6 @@ class CheckBoxVMActionTest < Test::Unit::TestCase end context "calling" do - setup do - end - should "raise error if box not specified" do app, env = action_env(vagrant_env(vagrantfile(<<-vf))) config.vm.box = nil @@ -47,6 +44,7 @@ class CheckBoxVMActionTest < Test::Unit::TestCase seq = sequence("seq") env.env.boxes.expects(:find).returns(nil) Vagrant::Box.expects(:add).with(env.env, env["config"].vm.box, env["config"].vm.box_url).in_sequence(seq) + env.env.boxes.expects(:reload!).in_sequence(seq) app.expects(:call).with(env).once.in_sequence(seq) assert_nothing_raised {