Skip to content

Commit

Permalink
Fixes microsoft#136771: update to Electron v13.5.2 and pass `--ms-ena…
Browse files Browse the repository at this point in the history
…ble-run-as-node` together with `ELECTRON_RUN_AS_NODE`
  • Loading branch information
deepak1556 authored and alexdima committed Nov 9, 2021
1 parent 4f4c92d commit cdf9233
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion darwin/bin/code.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,5 @@ function realpath() { python -c "import os,sys; print(os.path.realpath(sys.argv[
CONTENTS="$(dirname "$(dirname "$(dirname "$(dirname "$(realpath "$0")")")")")"
ELECTRON="$CONTENTS/MacOS/Electron"
CLI="$CONTENTS/Resources/app/out/cli.js"
ELECTRON_RUN_AS_NODE=1 "$ELECTRON" "$CLI" "$@"
ELECTRON_RUN_AS_NODE=1 "$ELECTRON" --ms-enable-electron-run-as-node "$CLI" "$@"
exit $?
2 changes: 1 addition & 1 deletion linux/bin/code.sh
Original file line number Diff line number Diff line change
Expand Up @@ -50,5 +50,5 @@ fi

ELECTRON="$VSCODE_PATH/@@NAME@@"
CLI="$VSCODE_PATH/resources/app/out/cli.js"
ELECTRON_RUN_AS_NODE=1 "$ELECTRON" "$CLI" "$@"
ELECTRON_RUN_AS_NODE=1 "$ELECTRON" --ms-enable-electron-run-as-node "$CLI" "$@"
exit $?
4 changes: 2 additions & 2 deletions win32/bin/code.cmd
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@
setlocal
set VSCODE_DEV=
set ELECTRON_RUN_AS_NODE=1
"%~dp0..\@@NAME@@.exe" "%~dp0..\resources\app\out\cli.js" %*
endlocal
"%~dp0..\@@NAME@@.exe" --ms-enable-electron-run-as-node "%~dp0..\resources\app\out\cli.js" %*
endlocal
4 changes: 2 additions & 2 deletions win32/bin/code.sh
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ if [ $IN_WSL = true ]; then
# use the Remote WSL extension if installed
WSL_EXT_ID="ms-vscode-remote.remote-wsl"

ELECTRON_RUN_AS_NODE=1 "$ELECTRON" "$CLI" --locate-extension $WSL_EXT_ID >/tmp/remote-wsl-loc.txt 2>/dev/null </dev/null
ELECTRON_RUN_AS_NODE=1 "$ELECTRON" --ms-enable-electron-run-as-node "$CLI" --locate-extension $WSL_EXT_ID >/tmp/remote-wsl-loc.txt 2>/dev/null </dev/null
WSL_EXT_WLOC=$(cat /tmp/remote-wsl-loc.txt)

if [ -n "$WSL_EXT_WLOC" ]; then
Expand All @@ -58,5 +58,5 @@ elif [ -x "$(command -v cygpath)" ]; then
else
CLI="$VSCODE_PATH/resources/app/out/cli.js"
fi
ELECTRON_RUN_AS_NODE=1 "$ELECTRON" "$CLI" "$@"
ELECTRON_RUN_AS_NODE=1 "$ELECTRON" --ms-enable-electron-run-as-node "$CLI" "$@"
exit $?

0 comments on commit cdf9233

Please sign in to comment.