From 31ec5c540fdd8a82c7efefcfb149a11a22681f3d Mon Sep 17 00:00:00 2001 From: Jeff Bonhag Date: Tue, 10 Dec 2019 11:29:43 -0500 Subject: [PATCH] Make this error message more useful --- .../virtualbox/action/clean_machine_folder.rb | 1 + templates/locales/en.yml | 10 +++++----- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/plugins/providers/virtualbox/action/clean_machine_folder.rb b/plugins/providers/virtualbox/action/clean_machine_folder.rb index 00e67176f..d4fdf5203 100644 --- a/plugins/providers/virtualbox/action/clean_machine_folder.rb +++ b/plugins/providers/virtualbox/action/clean_machine_folder.rb @@ -19,6 +19,7 @@ module VagrantPlugins clean_machine_folder(machine_folder) rescue Errno::EPERM raise Vagrant::Errors::MachineFolderNotAccessible, + name: env[:machine].name, path: machine_folder end diff --git a/templates/locales/en.yml b/templates/locales/en.yml index f033b342b..72737a7b8 100644 --- a/templates/locales/en.yml +++ b/templates/locales/en.yml @@ -965,14 +965,14 @@ en: listing for any "ruby" or "vagrant" processes and kill them. Then try again. machine_folder_not_accessible: |- - Vagrant is not permitted to access the machine folder by the host - operating system. The machine folder is located at the following - path: + Vagrant attempted to clean the machine folder for the machine '%{name}' + but does not have permission to read the following path: %{path} - Note that this may be a restriction on the terminal emulator running - Vagrant, or it may be a restriction on Vagrant itself. + Please ensure that Vagrant has the proper permissions to access the path + above. You may need to grant this permission to the terminal emulator + running Vagrant as well. machine_guest_not_ready: |- Guest-specific operations were attempted on a machine that is not ready for guest communication. This should not happen and a bug