From c5fdd47a56eb276c6a99372a74e16e1c4cae33e8 Mon Sep 17 00:00:00 2001 From: Sergii Bondarenko Date: Tue, 13 Feb 2018 17:19:11 +0400 Subject: [PATCH] #9298: Respect usernames with spaces --- lib/vagrant/util/platform.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/vagrant/util/platform.rb b/lib/vagrant/util/platform.rb index 0e8d56365..10522ea05 100644 --- a/lib/vagrant/util/platform.rb +++ b/lib/vagrant/util/platform.rb @@ -308,7 +308,7 @@ module Vagrant logger.debug("Querying installed WSL from Windows registry.") - PowerShell.execute_cmd('(Get-ChildItem HKCU:\Software\Microsoft\Windows\CurrentVersion\Lxss | ForEach-Object {Get-ItemProperty $_.PSPath}).BasePath').split(" ").each do |path| + PowerShell.execute_cmd('(Get-ChildItem HKCU:\Software\Microsoft\Windows\CurrentVersion\Lxss | ForEach-Object {Get-ItemProperty $_.PSPath}).BasePath').split("\r\n").each do |path| # Lowercase the drive letter, skip the next symbol (which is a # colon from a Windows path) and convert path to UNIX style. path = "/mnt/#{path[0, 1].downcase}#{path[2..-1].tr('\\', '/')}/rootfs"