diff options
author | deepak1556 <hop2deep@gmail.com> | 2021-11-09 21:09:26 +0300 |
---|---|---|
committer | Alex Dima <alexdima@microsoft.com> | 2021-11-09 21:09:26 +0300 |
commit | ac29daaf3b35fe21fb9121312b1f37851d650ce8 (patch) | |
tree | ac367afc18bc5afeb29a9c9d61b615bff02bdb20 | |
parent | 36b7d6e8bc24533c9b649f3811949ee9f80f241b (diff) |
Fixes #136771: update to Electron v13.5.2 and pass `--ms-enable-run-as-node` together with `ELECTRON_RUN_AS_NODE`
-rw-r--r-- | .yarnrc | 2 | ||||
-rwxr-xr-x | extensions/git/src/askpass.sh | 2 | ||||
-rw-r--r-- | extensions/git/src/askpass.ts | 1 | ||||
-rwxr-xr-x | resources/darwin/bin/code.sh | 2 | ||||
-rwxr-xr-x | resources/linux/bin/code.sh | 2 | ||||
-rw-r--r-- | resources/win32/bin/code.cmd | 4 | ||||
-rw-r--r-- | resources/win32/bin/code.sh | 4 | ||||
-rw-r--r-- | scripts/code-cli.bat | 2 | ||||
-rwxr-xr-x | scripts/code-cli.sh | 2 | ||||
-rwxr-xr-x | scripts/code.sh | 2 | ||||
-rw-r--r-- | scripts/node-electron.bat | 4 | ||||
-rwxr-xr-x | scripts/node-electron.sh | 2 | ||||
-rw-r--r-- | src/vs/platform/environment/node/shellEnv.ts | 4 | ||||
-rw-r--r-- | src/vs/server/remoteCli.ts | 1 |
14 files changed, 19 insertions, 15 deletions
@@ -1,4 +1,4 @@ disturl "https://electronjs.org/headers" -target "13.5.1" +target "13.5.2" runtime "electron" build_from_source "true" diff --git a/extensions/git/src/askpass.sh b/extensions/git/src/askpass.sh index d19b62affa3..c85c64ad2fd 100755 --- a/extensions/git/src/askpass.sh +++ b/extensions/git/src/askpass.sh @@ -1,5 +1,5 @@ #!/bin/sh VSCODE_GIT_ASKPASS_PIPE=`mktemp` -ELECTRON_RUN_AS_NODE="1" VSCODE_GIT_ASKPASS_PIPE="$VSCODE_GIT_ASKPASS_PIPE" "$VSCODE_GIT_ASKPASS_NODE" "$VSCODE_GIT_ASKPASS_MAIN" $* +ELECTRON_RUN_AS_NODE="1" VSCODE_GIT_ASKPASS_PIPE="$VSCODE_GIT_ASKPASS_PIPE" "$VSCODE_GIT_ASKPASS_NODE" "$VSCODE_GIT_ASKPASS_EXTRA_ARGS" "$VSCODE_GIT_ASKPASS_MAIN" $* cat $VSCODE_GIT_ASKPASS_PIPE rm $VSCODE_GIT_ASKPASS_PIPE diff --git a/extensions/git/src/askpass.ts b/extensions/git/src/askpass.ts index 7fc29a371ad..11c8e367649 100644 --- a/extensions/git/src/askpass.ts +++ b/extensions/git/src/askpass.ts @@ -83,6 +83,7 @@ export class Askpass implements IIPCHandler { ...this.ipc.getEnv(), GIT_ASKPASS: path.join(__dirname, 'askpass.sh'), VSCODE_GIT_ASKPASS_NODE: process.execPath, + VSCODE_GIT_ASKPASS_EXTRA_ARGS: !!process.versions['electron'] ? '--ms-enable-electron-run-as-node' : '', VSCODE_GIT_ASKPASS_MAIN: path.join(__dirname, 'askpass-main.js') }; } diff --git a/resources/darwin/bin/code.sh b/resources/darwin/bin/code.sh index 6a9a9ec737c..eae80f95d57 100755 --- a/resources/darwin/bin/code.sh +++ b/resources/darwin/bin/code.sh @@ -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 $? diff --git a/resources/linux/bin/code.sh b/resources/linux/bin/code.sh index 06973937f14..5d9fb6edefd 100755 --- a/resources/linux/bin/code.sh +++ b/resources/linux/bin/code.sh @@ -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 $? diff --git a/resources/win32/bin/code.cmd b/resources/win32/bin/code.cmd index 33c640f5dd1..890767b226a 100644 --- a/resources/win32/bin/code.cmd +++ b/resources/win32/bin/code.cmd @@ -2,5 +2,5 @@ setlocal set VSCODE_DEV= set ELECTRON_RUN_AS_NODE=1 -"%~dp0..\@@NAME@@.exe" "%~dp0..\resources\app\out\cli.js" %* -endlocal
\ No newline at end of file +"%~dp0..\@@NAME@@.exe" --ms-enable-electron-run-as-node "%~dp0..\resources\app\out\cli.js" %* +endlocal diff --git a/resources/win32/bin/code.sh b/resources/win32/bin/code.sh index 23fbbc9bf20..25fa85b7b3d 100644 --- a/resources/win32/bin/code.sh +++ b/resources/win32/bin/code.sh @@ -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 @@ -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 $? diff --git a/scripts/code-cli.bat b/scripts/code-cli.bat index c2eae24d4d9..a4a2c68ae02 100644 --- a/scripts/code-cli.bat +++ b/scripts/code-cli.bat @@ -24,7 +24,7 @@ set ELECTRON_ENABLE_LOGGING=1 set ELECTRON_ENABLE_STACK_DUMPING=1 :: Launch Code -%CODE% --inspect=5874 out\cli.js %~dp0.. %* +%CODE% --ms-enable-electron-run-as-node --inspect=5874 out\cli.js %~dp0.. %* goto end :builtin diff --git a/scripts/code-cli.sh b/scripts/code-cli.sh index a792c08532e..7d70a40aeff 100755 --- a/scripts/code-cli.sh +++ b/scripts/code-cli.sh @@ -34,7 +34,7 @@ function code() { VSCODE_DEV=1 \ ELECTRON_ENABLE_LOGGING=1 \ ELECTRON_ENABLE_STACK_DUMPING=1 \ - "$CODE" --inspect=5874 "$ROOT/out/cli.js" . "$@" + "$CODE" --ms-enable-electron-run-as-node --inspect=5874 "$ROOT/out/cli.js" . "$@" } code "$@" diff --git a/scripts/code.sh b/scripts/code.sh index 9caa49b1bf7..528e76f9c54 100755 --- a/scripts/code.sh +++ b/scripts/code.sh @@ -58,7 +58,7 @@ function code-wsl() cd $ROOT export WSLENV=ELECTRON_RUN_AS_NODE/w:VSCODE_DEV/w:$WSLENV local WSL_EXT_ID="ms-vscode-remote.remote-wsl" - local WSL_EXT_WLOC=$(echo "" | VSCODE_DEV=1 ELECTRON_RUN_AS_NODE=1 "$ROOT/.build/electron/Code - OSS.exe" "out/cli.js" --locate-extension $WSL_EXT_ID) + local WSL_EXT_WLOC=$(echo "" | VSCODE_DEV=1 ELECTRON_RUN_AS_NODE=1 "$ROOT/.build/electron/Code - OSS.exe" --ms-enable-electron-run-as-node "out/cli.js" --locate-extension $WSL_EXT_ID) cd $CWD if [ -n "$WSL_EXT_WLOC" ]; then # replace \r\n with \n in WSL_EXT_WLOC diff --git a/scripts/node-electron.bat b/scripts/node-electron.bat index 4ddb95b3cae..0d91ca9bc02 100644 --- a/scripts/node-electron.bat +++ b/scripts/node-electron.bat @@ -10,9 +10,9 @@ set NAMESHORT=%NAMESHORT: "=% set NAMESHORT=%NAMESHORT:"=%.exe set CODE=".build\electron\%NAMESHORT%" -%CODE% %* +%CODE% --ms-enable-electron-run-as-node %* popd endlocal -exit /b %errorlevel%
\ No newline at end of file +exit /b %errorlevel% diff --git a/scripts/node-electron.sh b/scripts/node-electron.sh index 0a822b6c383..2e4dc6dbfe1 100755 --- a/scripts/node-electron.sh +++ b/scripts/node-electron.sh @@ -26,9 +26,11 @@ export VSCODE_DEV=1 if [[ "$OSTYPE" == "darwin"* ]]; then ulimit -n 4096 ; ELECTRON_RUN_AS_NODE=1 \ "$CODE" \ + --ms-enable-electron-run-as-node \ "$@" else ELECTRON_RUN_AS_NODE=1 \ "$CODE" \ + --ms-enable-electron-run-as-node \ "$@" fi diff --git a/src/vs/platform/environment/node/shellEnv.ts b/src/vs/platform/environment/node/shellEnv.ts index de217e36abe..0033b39a907 100644 --- a/src/vs/platform/environment/node/shellEnv.ts +++ b/src/vs/platform/environment/node/shellEnv.ts @@ -130,10 +130,10 @@ async function doResolveUnixShellEnv(logService: ILogService, token: Cancellatio if (/^pwsh(-preview)?$/.test(name)) { // Older versions of PowerShell removes double quotes sometimes so we use "double single quotes" which is how // you escape single quotes inside of a single quoted string. - command = `& '${process.execPath}' -p '''${mark}'' + JSON.stringify(process.env) + ''${mark}'''`; + command = `& '${process.execPath}' --ms-enable-electron-run-as-node -p '''${mark}'' + JSON.stringify(process.env) + ''${mark}'''`; shellArgs = ['-Login', '-Command']; } else { - command = `'${process.execPath}' -p '"${mark}" + JSON.stringify(process.env) + "${mark}"'`; + command = `'${process.execPath}' --ms-enable-electron-run-as-node -p '"${mark}" + JSON.stringify(process.env) + "${mark}"'`; if (name === 'tcsh') { shellArgs = ['-ic']; diff --git a/src/vs/server/remoteCli.ts b/src/vs/server/remoteCli.ts index fcc82d710ae..28dfc625974 100644 --- a/src/vs/server/remoteCli.ts +++ b/src/vs/server/remoteCli.ts @@ -236,6 +236,7 @@ export function main(desc: ProductDescription, args: string[]): void { } else { const cliCwd = dirname(cliCommand); const env = { ...process.env, ELECTRON_RUN_AS_NODE: '1' }; + newCommandline.unshift('--ms-enable-electron-run-as-node'); newCommandline.unshift('resources/app/out/cli.js'); if (parsedArgs['verbose']) { console.log(`Invoking: ${cliCommand} ${newCommandline.join(' ')} in ${cliCwd}`); |