Error if OSE version is detected
This commit is contained in:
parent
376cd2f24d
commit
28eb56b9f8
|
@ -37,6 +37,8 @@ module Vagrant
|
||||||
error_and_exit(:virtualbox_not_detected)
|
error_and_exit(:virtualbox_not_detected)
|
||||||
elsif version.to_f < 3.1
|
elsif version.to_f < 3.1
|
||||||
error_and_exit(:virtualbox_invalid_version, :version => version.to_s)
|
error_and_exit(:virtualbox_invalid_version, :version => version.to_s)
|
||||||
|
elsif version.to_s.downcase.include?("ose")
|
||||||
|
error_and_exit(:virtualbox_invalid_ose, :version => version.to_s)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
@ -118,6 +118,11 @@
|
||||||
Vagrant could not detect VirtualBox! Make sure VirtualBox is properly installed.
|
Vagrant could not detect VirtualBox! Make sure VirtualBox is properly installed.
|
||||||
If VirtualBox is installed, it may be an incorrect version. Vagrant currently
|
If VirtualBox is installed, it may be an incorrect version. Vagrant currently
|
||||||
only supports VirtualBox 3.1.x. Please install the proper version to continue.
|
only supports VirtualBox 3.1.x. Please install the proper version to continue.
|
||||||
|
:virtualbox_invalid_ose: |-
|
||||||
|
Vagrant has detected you're using an OSE ("Open Source Edition") of VirtualBox.
|
||||||
|
Vagrant currently doesn't support any of the OSE editions due to slight API
|
||||||
|
differences. Please download the regular package from virtualbox.org and install
|
||||||
|
to continue.
|
||||||
:vm_failed_to_boot: |-
|
:vm_failed_to_boot: |-
|
||||||
Failed to connect to VM! Failed to boot?
|
Failed to connect to VM! Failed to boot?
|
||||||
:vm_base_not_found: |-
|
:vm_base_not_found: |-
|
||||||
|
|
|
@ -24,6 +24,13 @@ class EnvironmentTest < Test::Unit::TestCase
|
||||||
VirtualBox.expects(:version).returns(version)
|
VirtualBox.expects(:version).returns(version)
|
||||||
Vagrant::Environment.check_virtualbox!
|
Vagrant::Environment.check_virtualbox!
|
||||||
end
|
end
|
||||||
|
|
||||||
|
should "error and exit for OSE VirtualBox" do
|
||||||
|
version = "3.1.6_OSE"
|
||||||
|
Vagrant::Environment.expects(:error_and_exit).with(:virtualbox_invalid_ose, :version => version.to_s).once
|
||||||
|
VirtualBox.expects(:version).returns(version)
|
||||||
|
Vagrant::Environment.check_virtualbox!
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
context "class method load!" do
|
context "class method load!" do
|
||||||
|
|
Loading…
Reference in New Issue