Skip to content

Commit 87fd1d4

Browse files
committed
Strange console output when using WSL
1 parent 9904593 commit 87fd1d4

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

resources/win32/bin/code.sh

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,11 @@ if grep -qi Microsoft /proc/version; then
1111
# in a wsl shell
1212
WIN_CODE_CMD=$(wslpath -w "$(dirname "$(realpath "$0")")/$APP_NAME.cmd")
1313
if ! [ -z "$WIN_CODE_CMD" ]; then
14+
# make sure the cwd is in the windows fs, otherwise there will be a warning from cmd
15+
pushd "$(dirname "$0")" > /dev/null
1416
WSL_EXT_ID="ms-vscode.remote-wsl"
1517
WSL_EXT_WLOC=$(cmd.exe /c "$WIN_CODE_CMD" --locate-extension $WSL_EXT_ID)
18+
popd > /dev/null
1619
if ! [ -z "$WSL_EXT_WLOC" ]; then
1720
# replace \r\n with \n in WSL_EXT_WLOC, get linux path for
1821
WSL_CODE=$(wslpath -u "${WSL_EXT_WLOC%%[[:cntrl:]]}")/scripts/wslCode.sh

0 commit comments

Comments
 (0)