do not automatically add /vagrant synced folder if another folder is already assigned to current path
This commit is contained in:
parent
9671f00e3a
commit
461f6f1281
|
@ -429,12 +429,7 @@ module VagrantPlugins
|
||||||
p.run = p.run.to_sym if p.run
|
p.run = p.run.to_sym if p.run
|
||||||
end
|
end
|
||||||
|
|
||||||
# If we didn't share our current directory, then do it
|
current_dir_shared = false
|
||||||
# manually.
|
|
||||||
if !@__synced_folders["/vagrant"]
|
|
||||||
synced_folder(".", "/vagrant")
|
|
||||||
end
|
|
||||||
|
|
||||||
@__synced_folders.each do |id, options|
|
@__synced_folders.each do |id, options|
|
||||||
if options[:nfs]
|
if options[:nfs]
|
||||||
options[:type] = :nfs
|
options[:type] = :nfs
|
||||||
|
@ -444,6 +439,14 @@ module VagrantPlugins
|
||||||
if options[:type] == :nfs && Vagrant::Util::Platform.windows?
|
if options[:type] == :nfs && Vagrant::Util::Platform.windows?
|
||||||
options.delete(:type)
|
options.delete(:type)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
if options[:hostpath] == '.'
|
||||||
|
current_dir_shared = true
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
if !current_dir_shared && !@__synced_folders["/vagrant"]
|
||||||
|
synced_folder(".", "/vagrant")
|
||||||
end
|
end
|
||||||
|
|
||||||
# Flag that we finalized
|
# Flag that we finalized
|
||||||
|
|
Loading…
Reference in New Issue