`df` -> `/bin/df` to use macOS version

Thanks, @AntonioMeireles!
This commit is contained in:
Andy Fowler 2019-10-08 10:53:56 -04:00 committed by Chris Roberts
parent ae9c3e28d6
commit e288a5b732
1 changed files with 3 additions and 3 deletions

View File

@ -214,9 +214,9 @@ module VagrantPlugins
def self.nfs_check_folders_for_apfs(folders)
folders.each do |_, opts|
# check to see if this path is mounted in an APFS filesystem, and if it's in the
# firmlink which must be prefixed.
is_mounted_apfs_command = "df -t apfs #{opts[:hostpath]}"
# check to see if this path is mounted in an APFS filesystem, and if it's under the
# firmlink which must be prefixed. we need to use the OS X df — GNU won't notice.
is_mounted_apfs_command = "/bin/df -t apfs #{opts[:hostpath]}"
result = Vagrant::Util::Subprocess.execute(*Shellwords.split(is_mounted_apfs_command))
if (result.stdout.include? OSX_FIRMLINK_HACK)
opts[:hostpath].prepend(OSX_FIRMLINK_HACK)