providers/virtualbox: fix bug, make message clearer

This commit is contained in:
Mitchell Hashimoto 2015-07-06 18:18:13 -06:00
parent 71940c60ba
commit cd18eddb1c
2 changed files with 7 additions and 4 deletions

View File

@ -76,8 +76,10 @@ module VagrantPlugins
# We have to check if the UID matches to avoid issues with
# VirtualBox.
uid = @machine.uid
if uid && uid.to_s == Process.uid.to_s
raise Vagrant::Errors::VirtualBoxUserMismatch, uid: uid.to_s
if uid && uid.to_s != Process.uid.to_s
raise Vagrant::Errors::VirtualBoxUserMismatch,
original_uid: uid.to_s,
uid: Process.uid.to_s
end
# Determine the ID of the state here.

View File

@ -1321,9 +1321,10 @@ en:
The VirtualBox VM was created with a user that doesn't match the
current user running Vagrant. VirtualBox requires that the same user
be used to manage the VM that was created. Please re-run Vagrant with
that user.
that user. This is not a Vagrant issue.
The UID used to create the VM was: %{uid}
The UID used to create the VM was: %{original_uid}
Your UID is: %{uid}
virtualbox_version_empty: |-
Vagrant detected that VirtualBox appears installed on your system,
but calls to detect the version are returning empty. This is often