lucyllewy / one-script-wsl2-systemd

The one-script variant of the systemd hack for WSL2
MIT License
233 stars 39 forks source link

'$HOME/.wsl-cmds' not in path when starting vscode normally #27

Open spectrapulse opened 2 years ago

spectrapulse commented 2 years ago

When starting vscode without launching it from a WSL shell with remote.WSL.useShellEnvironment enabled, $HOME/.wsl-cmds will not be available in path.

Making both the SSH and the GPG agent inaccessible to vscode and other tools that take the same approach as vscode to detect the environment.

Maybe it is an idea to make the script add PATH="$HOME/.wsl-cmds:$PATH:/snap/bin" to ~/.bashrc, ~/.profile or whatever vscode gets the environment from? Or maybe it's an idea to change how the environment is configured?

Without it will make both the forwarded agents and snap inaccessible from vscode as snap is also not in path.

image

lucyllewy commented 2 years ago

please redownload the install.ps1 which has been updated since you previously installed and rerun it as per the instructions you followed before or are listed in the README of this repository. It should update your installation to no-longer require the .wsl-cmds directory as we now use the Windows ssh-agent directly by using ssh on the Windows side and pipe it back into Linux via interop.

lucyllewy commented 2 years ago

Sorry, I completely got that wrong. I don't know my own code it seems. the .wsl-cmds directory is specifically what we're using for ssh to link it through to windows 🤦‍♀️ I'll have a look tomorrow during a live stream on Twitch to see if I can find out where the problem lies and whether I can fix it.