diff --git a/CHANGELOG.md b/CHANGELOG.md index 4065b1951..2ed0ae148 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -17,6 +17,7 @@ BUG FIXES: quickly. [GH-1505] - Error message if private key for SSH isn't owned by the proper user. [GH-1503] + - Don't error too early when `config.vm.box` is not properly set. ## 1.1.4 (March 25, 2013) diff --git a/lib/vagrant/environment.rb b/lib/vagrant/environment.rb index c25e08187..5f86306f3 100644 --- a/lib/vagrant/environment.rb +++ b/lib/vagrant/environment.rb @@ -302,13 +302,15 @@ module Vagrant @config_loader.load([:default, :home, :root, vm_config_key]) box = nil - begin - box = boxes.find(config.vm.box, provider) - rescue Errors::BoxUpgradeRequired - # Upgrade the box if we must - @logger.info("Upgrading box during config load: #{config.vm.box}") - boxes.upgrade(config.vm.box) - retry + if config.vm.box + begin + box = boxes.find(config.vm.box, provider) + rescue Errors::BoxUpgradeRequired + # Upgrade the box if we must + @logger.info("Upgrading box during config load: #{config.vm.box}") + boxes.upgrade(config.vm.box) + retry + end end # If a box was found, then we attempt to load the Vagrantfile for