Skip to content

Instantly share code, notes, and snippets.

@badsyntax
Created December 5, 2013 10:54
Show Gist options
  • Save badsyntax/7803472 to your computer and use it in GitHub Desktop.
Save badsyntax/7803472 to your computer and use it in GitHub Desktop.
Enforce Vagrant versions for running your vagrant file.
# -*- mode: ruby -*-
# vi: set ft=ruby :
Vagrant.configure("2") do |config|
vagrant_version = Vagrant::VERSION.sub(/^v/, '')
if vagrant_version < "1.3.0"
abort(sprintf("You need to have at least v1.3.0 of vagrant installed. You are currently using v%s", vagrant_version));
end
# etc...
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment