Repository navigation
Conversation
The shell is invoked with `wsl.exe`, which uses whichever Linux distribution the user has configured as their default. [1] The option is presented to the user when the following conditions are met: 1. `wsl.exe` and `wslconfig.exe` are both found in the system. 2. `wslconfig.exe /list` returns an exit code of zero. I verified that `wslconfig.exe /list` returns a non-zero exit code when the system has no Linux distributions installed. I decided to avoid the registry for detection since that has been discouraged by the WSL developers. [2] Closes desktop#4641 [1]: https://docs.microsoft.com/en-us/windows/wsl/wsl-config#wsl-and-wsl-command [2]: microsoft/WSL#3515
|
I pushed a new commit with linter fixes. Status is green now. |
|
Apologies for missing this @jayschwa! I'm adding |
|
Can someone with write access approve this? It would be great to have this feature. 😃 |
|
@coltenkrauter there are currently competing pull requests to address this - #6420 and #5379 - and I need to sit down and review both of them. I'm currently swamped with other feature and review work, but I'm aware of the interest in seeing this supported. |
|
I appreciate your response, sounds good. 👍 |
|
@jayschwa thanks for opening this up! I just pushed a new commit to this branch to wrap it in a feature flag, so we can control when this gets rolled out to users in case we encounter issues in the wild and need to roll it back. I've also tested this out on Ubuntu (Windows 10.0.18362.145) and everything seems fine, but I'm going to pore over the changes next and see if I haven any other suggestions to get in here as a first iteration on this support. |
| ) | ||
| return null | ||
| } | ||
| const exitCode = new Promise<number>(resolve => { |
There was a problem hiding this comment.
❔ Should we handle the error event emitted by the spawned process?
| }) | ||
| if ((await exitCode) !== 0) { | ||
| log.debug( | ||
| `[WSL] found wsl.exe and wslconfig.exe, but no distros are installed` |
There was a problem hiding this comment.
🎨 can we add the exit code received to this error message, to help with troubleshooting environment issues?
|
I have switched to Linux in the months since I created this PR. I no longer have a good way to develop and test the code, so someone else will have to be its champion. |
|
@jayschwa thanks for the update. I'll have a chat with @desktop/engineering and see what we can do about it... |
|
Superseded by #7821 |
Overview
Closes #4641
Description
The shell is invoked with
wsl.exe, which uses whichever Linux distribution the user has configured as their default. 1The option is presented to the user when the following conditions are met:
wsl.exeandwslconfig.exeare both found in the system.wslconfig.exe /listreturns an exit code of zero.I verified that
wslconfig.exe /listreturns a non-zero exit code when the system has no Linux distributions installed. I decided to avoid the registry for detection since that has been discouraged by the WSL developers. 2Release notes
Notes: Adds support for WSL shell in Windows.