From d659071a822abaadd334cbc77b4a52c888585e63 Mon Sep 17 00:00:00 2001 From: Mitchell Hashimoto Date: Fri, 8 Feb 2013 16:25:41 -0800 Subject: [PATCH] Check for NFS errors only if we actually have NFS folders --- lib/vagrant/action/builtin/nfs.rb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/vagrant/action/builtin/nfs.rb b/lib/vagrant/action/builtin/nfs.rb index 672641084..364233668 100644 --- a/lib/vagrant/action/builtin/nfs.rb +++ b/lib/vagrant/action/builtin/nfs.rb @@ -30,9 +30,6 @@ module Vagrant # Used by prepare_permission, so we need to save it @env = env - raise Errors::NFSNoHostIP if !env[:nfs_host_ip] - raise Errors::NFSNoGuestIP if !env[:nfs_machine_ip] - folders = {} env[:machine].config.vm.synced_folders.each do |id, opts| # If this synced folder doesn't enable NFS, ignore it. @@ -60,6 +57,9 @@ module Vagrant end 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 # and such on the folder itself. folders.each { |id, opts| prepare_folder(opts) }