diff --git a/CHANGELOG.md b/CHANGELOG.md index a8b74ab63..9be634307 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -88,6 +88,8 @@ BUG FIXES: [GH-2792] - hosts/bsd: Don't invoke shell for NFS sudo calls. [GH-2808] - hosts/bsd: Sort NFS exports to avoid false validation errors. [GH-2927] + - hosts/bsd: No more checkexports NFS errors if you're sharing the + same directory. [GH-3023] - hosts/gentoo: Look for systemctl in `/usr/bin` [GH-2858] - hosts/linux: Properly escape regular expression to prune NFS exports, allowing VMware to work properly. [GH-2934] diff --git a/plugins/hosts/bsd/cap/nfs.rb b/plugins/hosts/bsd/cap/nfs.rb index 7172e3400..260963c15 100644 --- a/plugins/hosts/bsd/cap/nfs.rb +++ b/plugins/hosts/bsd/cap/nfs.rb @@ -50,8 +50,10 @@ module VagrantPlugins end # Sort all the keys by length so that the directory closest to - # the root is exported first. + # the root is exported first. Also, remove duplicates so that + # checkexports will work properly. dirmap.each do |dirs, _| + dirs.uniq! dirs.sort_by! { |d| d.length } end