mirror of
https://github.com/vagrant-libvirt/vagrant-libvirt.git
synced 2025-02-25 18:55:27 -06:00
Move version sanity check to vagrant-libvirt.rb
If this check is executed in plugin.rb, the message is not displayed on older versions of vagrant, which defeats the purpose of the test.
This commit is contained in:
parent
177913ce0e
commit
4536218d33
@ -13,5 +13,11 @@ module VagrantPlugins
|
||||
end
|
||||
end
|
||||
|
||||
# This is a sanity check to make sure no one is attempting to install
|
||||
# this into an early Vagrant version.
|
||||
if Vagrant::VERSION < '1.5.0'
|
||||
raise 'The Vagrant Libvirt plugin is only compatible with Vagrant 1.5+'
|
||||
end
|
||||
|
||||
# make sure base module class defined before loading plugin
|
||||
require 'vagrant-libvirt/plugin'
|
||||
|
@ -4,12 +4,6 @@ rescue LoadError
|
||||
raise 'The Vagrant Libvirt plugin must be run within Vagrant.'
|
||||
end
|
||||
|
||||
# This is a sanity check to make sure no one is attempting to install
|
||||
# this into an early Vagrant version.
|
||||
if Vagrant::VERSION < '1.5.0'
|
||||
raise 'The Vagrant Libvirt plugin is only compatible with Vagrant 1.5+'
|
||||
end
|
||||
|
||||
# compatibility fix to define constant not available vagrant <1.6
|
||||
::Vagrant::MachineState::NOT_CREATED_ID ||= :not_created
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user