From: Michael Friedrich Date: Fri, 30 May 2014 14:12:42 +0000 (+0200) Subject: Require at least Vagrant 1.2.x in Vagrantfile. X-Git-Tag: v2.0.0-beta2~51 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=93a422fa818e3c9d5e3bfe2ac0e7cafe8920e28e;p=icinga2 Require at least Vagrant 1.2.x in Vagrantfile. Fixes #6365 --- diff --git a/Vagrantfile b/Vagrantfile index 6ee1f61f0..c09985b0b 100644 --- a/Vagrantfile +++ b/Vagrantfile @@ -2,6 +2,17 @@ # vi: set ft=ruby : VAGRANTFILE_API_VERSION = "2" +VAGRANT_REQUIRED_VERSION = "1.2.0" + +# Require 1.2.x at least +if ! defined? Vagrant.require_version + if Gem::Version.new(Vagrant::VERSION) < Gem::Version.new(VAGRANT_REQUIRED_VERSION) + puts "Vagrant >= " + VAGRANT_REQUIRED_VERSION + " required. Your version is " + Vagrant::VERSION + exit 1 + end +else + Vagrant.require_version ">= " + VAGRANT_REQUIRED_VERSION +end Vagrant.configure(VAGRANTFILE_API_VERSION) do |config| # All Vagrant configuration is done here. The most common configuration