]> granicus.if.org Git - icinga2/commitdiff
Require at least Vagrant 1.2.x in Vagrantfile.
authorMichael Friedrich <michael.friedrich@netways.de>
Fri, 30 May 2014 14:12:42 +0000 (16:12 +0200)
committerMichael Friedrich <michael.friedrich@netways.de>
Fri, 30 May 2014 14:12:42 +0000 (16:12 +0200)
Fixes #6365

Vagrantfile

index 6ee1f61f052830e649f7e5b4cbf5838fd6a4a2ed..c09985b0bb6d8ddeea6f795f5f93b2c204c317bb 100644 (file)
@@ -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