If no shared folders existed, don't worry about clearing them
This commit is contained in:
parent
97facb08fd
commit
b13de6a497
|
@ -31,6 +31,7 @@ module Vagrant
|
|||
end
|
||||
|
||||
def clear_shared_folders
|
||||
if runner.vm.shared_folders.length > 0
|
||||
logger.info "Clearing previously set shared folders..."
|
||||
|
||||
folders = @runner.vm.shared_folders.dup
|
||||
|
@ -40,6 +41,7 @@ module Vagrant
|
|||
|
||||
@runner.reload!
|
||||
end
|
||||
end
|
||||
|
||||
def create_metadata
|
||||
logger.info "Creating shared folders metadata..."
|
||||
|
|
|
@ -81,6 +81,12 @@ class SharedFoldersActionTest < Test::Unit::TestCase
|
|||
@runner.expects(:reload!).once.in_sequence(destroy_seq)
|
||||
@action.clear_shared_folders
|
||||
end
|
||||
|
||||
should "do nothing if no shared folders existed" do
|
||||
@shared_folders.clear
|
||||
@runner.expects(:reload!).never
|
||||
@action.clear_shared_folders
|
||||
end
|
||||
end
|
||||
|
||||
context "setting up shared folder metadata" do
|
||||
|
|
Loading…
Reference in New Issue