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:
Gerben Meijer 2016-04-09 20:29:37 +02:00
parent 177913ce0e
commit 4536218d33
2 changed files with 6 additions and 6 deletions

View File

@ -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'

View File

@ -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