From 5a227847539455cc5af62862bb3df085dfb1e1d0 Mon Sep 17 00:00:00 2001 From: januzis Date: Wed, 12 Mar 2014 21:23:33 +0100 Subject: [PATCH] Fixes introduced error running vagrant hostmanager command --- lib/vagrant-hostmanager/action/update_guest.rb | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/lib/vagrant-hostmanager/action/update_guest.rb b/lib/vagrant-hostmanager/action/update_guest.rb index 73a7cb1..7ab7352 100644 --- a/lib/vagrant-hostmanager/action/update_guest.rb +++ b/lib/vagrant-hostmanager/action/update_guest.rb @@ -11,6 +11,14 @@ module VagrantPlugins @machine = env[:machine] @global_env = @machine.env @provider = env[:provider] + + # config_global is deprecated from v1.5 + if Gem::Version.new(::Vagrant::VERSION) >= Gem::Version.new('1.5') + @config = @global_env.vagrantfile.config + else + @config = @global_env.config_global + end + @logger = Log4r::Logger.new('vagrant::hostmanager::update_guest') end