core: remove BoxUpgradeRequired exception
This commit is contained in:
parent
4cedd590d9
commit
e9afe386c1
|
@ -56,8 +56,6 @@ module Vagrant
|
||||||
# * BoxProviderDoesntMatch - If the given box provider doesn't match the
|
# * BoxProviderDoesntMatch - If the given box provider doesn't match the
|
||||||
# actual box provider in the untarred box.
|
# actual box provider in the untarred box.
|
||||||
# * BoxUnpackageFailure - An invalid tar file.
|
# * BoxUnpackageFailure - An invalid tar file.
|
||||||
# * BoxUpgradeRequired - You're attempting to add a box when there is a
|
|
||||||
# V1 box with the same name that must first be upgraded.
|
|
||||||
#
|
#
|
||||||
# Preconditions:
|
# Preconditions:
|
||||||
# * File given in `path` must exist.
|
# * File given in `path` must exist.
|
||||||
|
|
|
@ -348,14 +348,8 @@ module Vagrant
|
||||||
load_box_and_overrides = lambda do
|
load_box_and_overrides = lambda do
|
||||||
box = nil
|
box = nil
|
||||||
if config.vm.box
|
if config.vm.box
|
||||||
begin
|
box = boxes.find(
|
||||||
box = boxes.find(config.vm.box, box_formats, config.vm.box_version)
|
config.vm.box, box_formats, config.vm.box_version)
|
||||||
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
|
end
|
||||||
|
|
||||||
# If a box was found, then we attempt to load the Vagrantfile for
|
# If a box was found, then we attempt to load the Vagrantfile for
|
||||||
|
|
|
@ -196,10 +196,6 @@ module Vagrant
|
||||||
error_key(:untar_failure, "vagrant.actions.box.unpackage")
|
error_key(:untar_failure, "vagrant.actions.box.unpackage")
|
||||||
end
|
end
|
||||||
|
|
||||||
class BoxUpgradeRequired < VagrantError
|
|
||||||
error_key(:box_upgrade_required)
|
|
||||||
end
|
|
||||||
|
|
||||||
class BoxVerificationFailed < VagrantError
|
class BoxVerificationFailed < VagrantError
|
||||||
error_key(:failed, "vagrant.actions.box.verify")
|
error_key(:failed, "vagrant.actions.box.verify")
|
||||||
end
|
end
|
||||||
|
|
|
@ -376,10 +376,6 @@ en:
|
||||||
the provider specified. Please double-check and try again.
|
the provider specified. Please double-check and try again.
|
||||||
|
|
||||||
The providers for this are: %{providers}
|
The providers for this are: %{providers}
|
||||||
box_upgrade_required: |-
|
|
||||||
The box '%{name}' is still stored on disk in the Vagrant 1.0.x
|
|
||||||
format. This box must be upgraded in order to work properly with
|
|
||||||
this version of Vagrant.
|
|
||||||
bundler_disabled: |-
|
bundler_disabled: |-
|
||||||
Vagrant's built-in bundler management mechanism is disabled because
|
Vagrant's built-in bundler management mechanism is disabled because
|
||||||
Vagrant is running in an external bundler environment. In these
|
Vagrant is running in an external bundler environment. In these
|
||||||
|
|
Loading…
Reference in New Issue