Warning and automatically handle "v-root"

This commit is contained in:
Mitchell Hashimoto 2013-02-08 16:33:09 -08:00
parent d659071a82
commit abdbd2de08
1 changed files with 10 additions and 0 deletions

View File

@ -142,6 +142,16 @@ module VagrantPlugins
guestpath = options.delete(:guestpath) guestpath = options.delete(:guestpath)
hostpath = options.delete(:hostpath) hostpath = options.delete(:hostpath)
# This was the name of the old default /vagrant shared folder.
# We warn the use that this changed, but also silently change
# it to try to make things work properly.
if options[:id] == "v-root"
warnings << "The 'v-root' shared folders have been renamed to 'vagrant-root'.\n" +
"Assuming you meant 'vagrant-root'..."
options[:id] = "vagrant-root"
end
new.vm.synced_folder(hostpath, guestpath, options) new.vm.synced_folder(hostpath, guestpath, options)
end end