Merge pull request #9696 from D4rkSh1t/fix-rootpath-for-wsl

fix rootpath if the vagrantfile is located under the root directory (WSL)
This commit is contained in:
Chris Roberts 2018-04-27 17:04:23 -07:00 committed by GitHub
commit 3dcc350364
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -396,7 +396,7 @@ module Vagrant
root_path = wsl_rootfs
# lxrun splits home separate so we need to account
# for it's specialness here when we build the path
if root_path.end_with?("lxss") && parts.first != "home"
if root_path.end_with?("lxss") && !(["root", "home"].include?(parts.first))
root_path = "#{root_path}\\rootfs"
end
[root_path, *parts].join("\\")