Merge pull request #12056 from chrisroberts/f-wsl2-share

Update filesystem type match for WSL2
This commit is contained in:
Chris Roberts 2020-11-18 11:25:50 -08:00 committed by GitHub
commit 022158535f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -554,6 +554,7 @@ module Vagrant
# Get list of local mount paths that are DrvFs file systems
#
# @return [Array<String>]
# @todo(chrisroberts): Constantize types for check
def wsl_drvfs_mounts
if !defined?(@_wsl_drvfs_mounts)
@_wsl_drvfs_mounts = []
@ -561,7 +562,7 @@ module Vagrant
result = Util::Subprocess.execute("mount")
result.stdout.each_line do |line|
info = line.match(MOUNT_PATTERN)
if info && info[:type] == "drvfs"
if info && (info[:type] == "drvfs" || info[:type] == "9p")
@_wsl_drvfs_mounts << info[:mount]
end
end