From c1a0b970672a1af0df2aa576faac97c67ba72ba2 Mon Sep 17 00:00:00 2001 From: Mitchell Hashimoto Date: Wed, 30 Nov 2011 12:46:13 -0800 Subject: [PATCH] Only check non-OSE versions for checking guest addition versions [GH-514] --- lib/vagrant/action/vm/check_guest_additions.rb | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/lib/vagrant/action/vm/check_guest_additions.rb b/lib/vagrant/action/vm/check_guest_additions.rb index 9d8e3931d..2363434e4 100644 --- a/lib/vagrant/action/vm/check_guest_additions.rb +++ b/lib/vagrant/action/vm/check_guest_additions.rb @@ -16,10 +16,13 @@ module Vagrant if version.empty? env.ui.warn I18n.t("vagrant.actions.vm.check_guest_additions.not_detected") else - # Strip the -OSE/_OSE off from the guest additions - version = version.gsub(/[-_]ose/i, '') + # Strip the -OSE/_OSE off from the guest additions and the virtual box + # version since all the matters are that the version _numbers_ match up. + guest_version, vb_version = [version, VirtualBox.version].map do |v| + v.gsub(/[-_]ose/i, '') + end - if version != VirtualBox.version + if guest_version != vb_version env.ui.warn(I18n.t("vagrant.actions.vm.check_guest_additions.version_mismatch", :guest_version => version, :virtualbox_version => VirtualBox.version))