Don't error too early when config.vm.box is not properly set
This commit is contained in:
parent
40250843b3
commit
8156185f5d
|
@ -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)
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue