mirror of
https://github.com/Microsoft/vscode
synced 2024-09-13 13:46:13 +00:00
win/code.sh: falback when wslpath not present
This commit is contained in:
parent
d9b87e858e
commit
e146527fec
|
@ -7,12 +7,10 @@ APP_NAME="@@APPNAME@@"
|
|||
QUALITY="@@QUALITY@@"
|
||||
NAME="@@NAME@@"
|
||||
|
||||
set -e
|
||||
|
||||
if grep -qi Microsoft /proc/version; then
|
||||
# in a wsl shell
|
||||
WIN_CODE_CMD=$(wslpath -w "$(dirname "$(realpath "$0")")/$APP_NAME.cmd")
|
||||
|
||||
if ! [ -z "$WIN_CODE_CMD" ]; then
|
||||
WSL_EXT_ID="ms-vscode.remote-wsl"
|
||||
WSL_EXT_WLOC=$(cmd.exe /c "$WIN_CODE_CMD" --locate-extension $WSL_EXT_ID)
|
||||
if ! [ -z "$WSL_EXT_WLOC" ]; then
|
||||
|
@ -21,6 +19,7 @@ if grep -qi Microsoft /proc/version; then
|
|||
$WSL_CODE $COMMIT $QUALITY "$WIN_CODE_CMD" "$APP_NAME" "$@"
|
||||
exit $?
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
VSCODE_PATH="$(dirname "$(dirname "$(realpath "$0")")")"
|
||||
|
|
Loading…
Reference in a new issue