#9298: Respect usernames with spaces

This commit is contained in:
Sergii Bondarenko 2018-02-13 17:19:11 +04:00 committed by Chris Roberts
parent 6d08d1c5bf
commit c5fdd47a56
1 changed files with 1 additions and 1 deletions

View File

@ -308,7 +308,7 @@ module Vagrant
logger.debug("Querying installed WSL from Windows registry.") 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 # Lowercase the drive letter, skip the next symbol (which is a
# colon from a Windows path) and convert path to UNIX style. # colon from a Windows path) and convert path to UNIX style.
path = "/mnt/#{path[0, 1].downcase}#{path[2..-1].tr('\\', '/')}/rootfs" path = "/mnt/#{path[0, 1].downcase}#{path[2..-1].tr('\\', '/')}/rootfs"