mirror of
https://github.com/Microsoft/vscode
synced 2024-08-27 13:00:58 +00:00
Fixes #136771: update to Electron v13.5.2 and pass --ms-enable-run-as-node
together with ELECTRON_RUN_AS_NODE
This commit is contained in:
parent
36b7d6e8bc
commit
ac29daaf3b
2
.yarnrc
2
.yarnrc
|
@ -1,4 +1,4 @@
|
|||
disturl "https://electronjs.org/headers"
|
||||
target "13.5.1"
|
||||
target "13.5.2"
|
||||
runtime "electron"
|
||||
build_from_source "true"
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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')
|
||||
};
|
||||
}
|
||||
|
|
|
@ -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 $?
|
||||
|
|
|
@ -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 $?
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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 $?
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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 "$@"
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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%
|
||||
exit /b %errorlevel%
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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'];
|
||||
|
|
|
@ -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}`);
|
||||
|
|
Loading…
Reference in a new issue