DamionGans / ubuntu-wsl2-systemd-script

[Does not work anymore!] Script to enable systemd support on current Ubuntu WSL2 images

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

After executing: vscode doesn't start in project path.

sectasy0 opened this issue · comments

After executing this script, when starting a project in vscode via wsl in the terminal, it opens the path 'mnt/c/Program Files/vscode instead of project root directory. I'm using ubuntu 20.04

CMD.EXE was started with the above path as the current directory.
UNC paths are not supported.  Defaulting to Windows directory.

Okay, I figure this out. After deleting two env variables set by this script everything works fine.

echo "  setx WSLENV BASH_ENV/u"
echo "  setx BASH_ENV /etc/bash.bashrc"

Deleting these env variables didn't work for me unfortunately, it actually cause bash to not open at all in VSCode

HI, I follow your advice, comment the shell script and it works, thanks.

Okay, I figure this out. After deleting two env variables set by this script everything works fine.

echo "  setx WSLENV BASH_ENV/u"
echo "  setx BASH_ENV /etc/bash.bashrc"

the step is: 1. vi ubuntu-wsl2-systemd-script.sh
2. comment the two lines
# echo " setx WSLENV BASH_ENV/u"
# echo " setx BASH_ENV /etc/bash.bashrc"
3. rerun the script with: bash ubuntu-wsl2-systemd-script.sh --force
4. reboot WSL and start code

Deleting these env variables didn't work for me unfortunately, it actually cause bash to not open at all in VSCode

@lucacataldo

Sorry to be so late, but I didn't think there would be any traffic under this thread. Are you getting the same error as mine, or a different one?