core: merge default synced folders ,don't override [GH-2873]
This commit is contained in:
parent
e80552b6aa
commit
2b9e7ca14e
|
@ -60,6 +60,8 @@ BUG FIXES:
|
|||
indefinitely. [GH-2756]
|
||||
- core: Windows checks home directory permissions more correctly to
|
||||
warn of potential issues.
|
||||
- core: Synced folders set to the default synced folder explicitly won't
|
||||
be deleted. [GH-2873]
|
||||
- commands/box: Box add `--force` works with `--provider` flag. [GH-2757]
|
||||
- commands/box: Listing boxes with machine-readable output crash is gone.
|
||||
- commands/plugin: Plugin installation will fail if dependencies conflict,
|
||||
|
|
|
@ -96,7 +96,8 @@ module Vagrant
|
|||
raise Errors::NoDefaultSyncedFolderImpl, types: types
|
||||
end
|
||||
|
||||
folders[default_impl] = folders[""]
|
||||
folders[default_impl] ||= {}
|
||||
folders[default_impl].merge!(folders[""])
|
||||
folders.delete("")
|
||||
end
|
||||
|
||||
|
|
|
@ -75,12 +75,14 @@ describe Vagrant::Action::Builtin::MixinSyncedFolders do
|
|||
it "should return the proper set of folders" do
|
||||
folders["root"] = {}
|
||||
folders["another"] = { type: "" }
|
||||
folders["foo"] = { type: "default" }
|
||||
folders["nfs"] = { type: "nfs" }
|
||||
|
||||
result = subject.synced_folders(machine)
|
||||
result.length.should == 2
|
||||
result[:default].should == {
|
||||
"another" => folders["another"],
|
||||
"foo" => folders["foo"],
|
||||
"root" => folders["root"],
|
||||
}
|
||||
result[:nfs].should == { "nfs" => folders["nfs"] }
|
||||
|
|
Loading…
Reference in New Issue