diff --git a/CHANGELOG.md b/CHANGELOG.md index 9bca526..4ee07b4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,8 @@ BACKWARDS INCOMPATIBILITY: + - Support for Vagrant < 1.4 is gone, please use a previous plugin version if + you are running Vagrant 1.2 / 1.3 - Automatic handling of multiple machine scoped cache dirs from versions prior to 0.3.0 of this plugin was removed. - Support for `enable_nfs` has been deprecated and will be removed on 0.7.0, diff --git a/lib/vagrant-cachier/plugin.rb b/lib/vagrant-cachier/plugin.rb index 6d0ffcd..275e8c3 100644 --- a/lib/vagrant-cachier/plugin.rb +++ b/lib/vagrant-cachier/plugin.rb @@ -1,3 +1,9 @@ +# TODO: Switch to Vagrant.require_version before 1.0.0 +# see: https://github.com/mitchellh/vagrant/blob/bc55081e9ffaa6820113e449a9f76b293a29b27d/lib/vagrant.rb#L202-L228 +unless Gem::Requirement.new('>= 1.4.0').satisfied_by?(Gem::Version.new(Vagrant::VERSION)) + raise 'vagrant-cachier requires Vagrant >= 1.4.0 in order to work!' +end + require_relative 'provision_ext' Vagrant::Action::Builtin::Provision.class_eval do include VagrantPlugins::Cachier::ProvisionExt