提交 b9725ba6 编写于 作者: M Martin Aeschlimann

code.sh is broken in WSL after commit "run code wsl in dev ". Fixes #72263

上级 7ffcfd50
......@@ -59,19 +59,19 @@ function code-wsl()
{
# in a wsl shell
local WIN_CODE_CLI_CMD=$(wslpath -w "$ROOT/scripts/code-cli.bat")
local WSL_EXT_ID="ms-vscode.remote-wsl"
local WSL_EXT_WLOC=$(cmd.exe /c "$WIN_CODE_CLI_CMD" --locate-extension $WSL_EXT_ID)
if ! [ -z "$WSL_EXT_WLOC" ]; then
# replace \r\n with \n in WSL_EXT_WLOC
local WSL_CODE=$(wslpath -u "${WSL_EXT_WLOC%%[[:cntrl:]]}")/scripts/wslCode-dev.sh
$WSL_CODE "$ROOT" "$@"
exit $?
if [ -z "$WSL_EXT_WLOC" ]; then
local WSL_EXT_ID="ms-vscode.remote-wsl"
local WSL_EXT_WLOC=$(cmd.exe /c "$WIN_CODE_CLI_CMD" --locate-extension $WSL_EXT_ID)
if ! [ -z "$WSL_EXT_WLOC" ]; then
# replace \r\n with \n in WSL_EXT_WLOC
local WSL_CODE=$(wslpath -u "${WSL_EXT_WLOC%%[[:cntrl:]]}")/scripts/wslCode-dev.sh
$WSL_CODE "$ROOT" "$@"
exit $?
fi
fi
}
if [ -z ${IN_WSL+x} ]; then
code "$@"
else
if ! [ -z ${IN_WSL+x} ]; then
code-wsl "$@"
fi
\ No newline at end of file
fi
code "$@"
\ No newline at end of file
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册