Check for NFS errors only if we actually have NFS folders

This commit is contained in:
Mitchell Hashimoto 2013-02-08 16:25:41 -08:00
parent a53d569656
commit d659071a82
1 changed files with 3 additions and 3 deletions

View File

@ -30,9 +30,6 @@ module Vagrant
# Used by prepare_permission, so we need to save it # Used by prepare_permission, so we need to save it
@env = env @env = env
raise Errors::NFSNoHostIP if !env[:nfs_host_ip]
raise Errors::NFSNoGuestIP if !env[:nfs_machine_ip]
folders = {} folders = {}
env[:machine].config.vm.synced_folders.each do |id, opts| env[:machine].config.vm.synced_folders.each do |id, opts|
# If this synced folder doesn't enable NFS, ignore it. # If this synced folder doesn't enable NFS, ignore it.
@ -60,6 +57,9 @@ module Vagrant
end end
if !folders.empty? if !folders.empty?
raise Errors::NFSNoHostIP if !env[:nfs_host_ip]
raise Errors::NFSNoGuestIP if !env[:nfs_machine_ip]
# Prepare the folder, this means setting up various options # Prepare the folder, this means setting up various options
# and such on the folder itself. # and such on the folder itself.
folders.each { |id, opts| prepare_folder(opts) } folders.each { |id, opts| prepare_folder(opts) }