mirror of
https://github.com/vagrant-libvirt/vagrant-libvirt.git
synced 2025-02-25 18:55:27 -06:00
Merge pull request #587 from infernix/fix-version-test
Move version sanity check to vagrant-libvirt.rb
This commit is contained in:
commit
6b687efa6d
@ -13,5 +13,17 @@ module VagrantPlugins
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
begin
|
||||||
|
require 'vagrant'
|
||||||
|
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
|
||||||
|
|
||||||
# make sure base module class defined before loading plugin
|
# make sure base module class defined before loading plugin
|
||||||
require 'vagrant-libvirt/plugin'
|
require 'vagrant-libvirt/plugin'
|
||||||
|
@ -4,12 +4,6 @@ rescue LoadError
|
|||||||
raise 'The Vagrant Libvirt plugin must be run within Vagrant.'
|
raise 'The Vagrant Libvirt plugin must be run within Vagrant.'
|
||||||
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
|
|
||||||
|
|
||||||
# compatibility fix to define constant not available vagrant <1.6
|
# compatibility fix to define constant not available vagrant <1.6
|
||||||
::Vagrant::MachineState::NOT_CREATED_ID ||= :not_created
|
::Vagrant::MachineState::NOT_CREATED_ID ||= :not_created
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user