mirror of
https://github.com/Microsoft/vscode
synced 2024-08-27 13:00:58 +00:00
fix wsl selfhosting in scripts/code.sh
This commit is contained in:
parent
289bce5e1a
commit
a8581d60f2
|
@ -57,9 +57,9 @@ function code-wsl()
|
|||
if [ -f "$ELECTRON" ]; then
|
||||
local CWD=$(pwd)
|
||||
cd $ROOT
|
||||
export WSLENV=ELECTRON_RUN_AS_NODE/w:$WSLENV
|
||||
export WSLENV=ELECTRON_RUN_AS_NODE/w:VSCODE_DEV/w:$WSLENV
|
||||
local WSL_EXT_ID="ms-vscode-remote.remote-wsl"
|
||||
local WSL_EXT_WLOC=$(ELECTRON_RUN_AS_NODE=1 "$ROOT/.build/electron/Code - OSS.exe" "out/cli.js" --locate-extension $WSL_EXT_ID)
|
||||
local WSL_EXT_WLOC=$(VSCODE_DEV=1 ELECTRON_RUN_AS_NODE=1 "$ROOT/.build/electron/Code - OSS.exe" "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
|
||||
|
|
|
@ -60,11 +60,7 @@ export function parseMainProcessArgv(processArgv: string[]): NativeParsedArgs {
|
|||
* Use this to parse raw code CLI process.argv such as: `Electron cli.js . --verbose --wait`
|
||||
*/
|
||||
export function parseCLIProcessArgv(processArgv: string[]): NativeParsedArgs {
|
||||
let [, , ...args] = processArgv;
|
||||
|
||||
if (process.env['VSCODE_DEV']) {
|
||||
args = stripAppPath(args) || [];
|
||||
}
|
||||
let [, , ...args] = processArgv; // remove the first non-option argument: it's always the app location
|
||||
|
||||
return parseAndValidate(args, true);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue