Support WSL configuration where Windows paths are not in PATH#195
Support WSL configuration where Windows paths are not in PATH#195sindresorhus merged 7 commits intosindresorhus:masterfrom Pytal:master
Conversation
|
Did you see #188 (comment) ? // @tim-stasse |
|
Yes, I referenced it at the top. I noted the caveat in |
|
No, I meant that the existing implementation does the same as |
|
Right sorry for the misunderstanding. The use case for this is for users on WSL who do not have Windows paths exposed to WSL as seen in this create-react-app issue and therefore do not necessarily have |
And there's no way to fix this without using |
|
I only know of Maybe a hardcoded path to |
|
@Pytal I believe the actual issue that needs to be resolved here is #186 As I mentioned in #188, |
|
@tim-stasse Would the solution mentioned here suffice? Or is it preferable to not use another binary? |
|
@Pytal Probably just something like the following should work: command = '$(wslvar systemroot)\System32\WindowsPowerShell\v1.0\powershell.exe'
cliArguments.push(
'-NoProfile',
'-NonInteractive',
'–ExecutionPolicy',
'Bypass',
'-EncodedCommand'
);
if (isWsl) {
command = await wslToWindowsPath(command);
} else {
childProcessOptions.windowsVerbatimArguments = true;
} |
|
@tim-stasse I've made the changes using |
|
@Pytal Looks good to me 👍 |
Fixes #173 with the caveat of thewaitoption being ignored as mentioned here.Fixes #186