hosts/bsd: sort NFS exports to avoid false validation errors [GH-2927]
With a synced folder configuration like so: synced_folder ".", "/vagrant", :nfs => true synced_folder "#{ENV['HOME']}/mirror", "/mirror", :nfs => true synced_folder ENV['HOME'], "/home/#{ENV['USER']}", :nfs => true on OSX, vagrant writes two overlapping exports to /etc/exports which then fail the export check. Iterating through the list of folders lexically builds a correct, single exports entry. Signed-off-by: Teemu Matilainen <teemu.matilainen@iki.fi>
This commit is contained in:
parent
7d90191212
commit
7b30e557cd
|
@ -25,7 +25,7 @@ module VagrantPlugins
|
|||
# We build up this mapping within the following hash.
|
||||
logger.debug("Compiling map of sub-directories for NFS exports...")
|
||||
dirmap = {}
|
||||
folders.each do |_, opts|
|
||||
folders.sort_by { |_, opts| opts[:hostpath] }.each do |_, opts|
|
||||
hostpath = opts[:hostpath].dup
|
||||
hostpath.gsub!('"', '\"')
|
||||
|
||||
|
|
Loading…
Reference in New Issue