Don't return when finding disabled shared folder, continue to include others
This commit is contained in:
parent
c875e4345a
commit
f2242662f8
|
@ -32,7 +32,7 @@ module Vagrant
|
||||||
@env.env.config.vm.shared_folders.inject({}) do |acc, data|
|
@env.env.config.vm.shared_folders.inject({}) do |acc, data|
|
||||||
key, value = data
|
key, value = data
|
||||||
|
|
||||||
return acc if value[:disabled]
|
next acc if value[:disabled]
|
||||||
|
|
||||||
# This to prevent overwriting the actual shared folders data
|
# This to prevent overwriting the actual shared folders data
|
||||||
value = value.dup
|
value = value.dup
|
||||||
|
|
|
@ -87,10 +87,13 @@ class ShareFoldersVMActionTest < Test::Unit::TestCase
|
||||||
|
|
||||||
should "ignore disabled shared folders" do
|
should "ignore disabled shared folders" do
|
||||||
stub_shared_folders do |config|
|
stub_shared_folders do |config|
|
||||||
|
config.vm.share_folder("v-foo", "/foo", "/foo")
|
||||||
config.vm.share_folder("v-root", "/vagrant", ".", :disabled => true)
|
config.vm.share_folder("v-root", "/vagrant", ".", :disabled => true)
|
||||||
|
config.vm.share_folder("v-bar", "/bar", "/bar")
|
||||||
end
|
end
|
||||||
|
|
||||||
assert @instance.shared_folders.empty?
|
assert_equal 2, @instance.shared_folders.length
|
||||||
|
assert_equal %W[v-bar v-foo], @instance.shared_folders.keys.sort
|
||||||
end
|
end
|
||||||
|
|
||||||
should "append sync suffix if sync enabled to a folder" do
|
should "append sync suffix if sync enabled to a folder" do
|
||||||
|
|
|
@ -9,7 +9,7 @@ Gem::Specification.new do |s|
|
||||||
|
|
||||||
s.required_rubygems_version = Gem::Requirement.new("> 1.3.1") if s.respond_to? :required_rubygems_version=
|
s.required_rubygems_version = Gem::Requirement.new("> 1.3.1") if s.respond_to? :required_rubygems_version=
|
||||||
s.authors = ["Mitchell Hashimoto", "John Bender"]
|
s.authors = ["Mitchell Hashimoto", "John Bender"]
|
||||||
s.date = %q{2010-07-20}
|
s.date = %q{2010-07-21}
|
||||||
s.default_executable = %q{vagrant}
|
s.default_executable = %q{vagrant}
|
||||||
s.description = %q{Vagrant is a tool for building and distributing virtualized development environments.}
|
s.description = %q{Vagrant is a tool for building and distributing virtualized development environments.}
|
||||||
s.email = ["mitchell.hashimoto@gmail.com", "john.m.bender@gmail.com"]
|
s.email = ["mitchell.hashimoto@gmail.com", "john.m.bender@gmail.com"]
|
||||||
|
|
Loading…
Reference in New Issue