-
-
Notifications
You must be signed in to change notification settings - Fork 224
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Remove usage of wslu
#217
Remove usage of wslu
#217
Conversation
This PR is simplified version of sindresorhus#198 - Windows 10 does not allow installing the OS to locations other than C:\Windows so fetching %systemroot% is unnecessary here (and since WSL is exclusive to Windows 10, we do not need to worry about Win7 here). WSL also handles marshaling paths between WSL and Windows, so we don't need to convert this path manually.
be0767a
to
ae0743b
Compare
command = String.raw`${windowsRoot}\System32\WindowsPowerShell\v1.0\powershell${isWsl ? '.exe' : ''}`; | ||
command = isWsl ? | ||
'/mnt/c/Windows/System32/WindowsPowerShell/v1.0/powershell.exe' : | ||
`${process.env.SYSTEMROOT}\\System32\\WindowsPowerShell\\v1.0\\powershell`; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This line is for standard Win32, where we may be running under Win7 where installing to a different location may be possible - luckily we can just fetch %SYSTEMROOT% here
Thanks :) |
Seeing this too late, but:
The Windows location is configurable (in WSL) – so while this PR hard-coded |
Why would anyone do this other than a desire to have their tools be less reliable? |
@anaisbetts |
This PR is simplified version of #198 - Windows 10 does not allow installing the OS to locations other than
C:\Windows
so fetching%systemroot%
is unnecessary here (and since WSL is exclusive to Windows 10, we do not need to worry about Win7 here). WSL also handles marshaling paths between WSL and Windows, so we don't need to convert this path manually.Fixes #198
Fixes #200
Fixes #204