fix: insiders cli launch from wsl terminal (#279444)

* fix: insiders cli launch from wsl terminal

* chore: also update server cli

* chore: address review feedback
This commit is contained in:
Robo
2025-11-27 00:29:52 +09:00
committed by GitHub
parent ab05599957
commit 1fefbeea3c
2 changed files with 7 additions and 2 deletions

View File

@@ -39,7 +39,7 @@ fi
if [ $IN_WSL = true ]; then if [ $IN_WSL = true ]; then
export WSLENV="ELECTRON_RUN_AS_NODE/w:$WSLENV" export WSLENV="ELECTRON_RUN_AS_NODE/w:$WSLENV"
CLI=$(wslpath -m "$VSCODE_PATH/resources/app/out/cli.js") CLI=$(wslpath -m "$VSCODE_PATH/$VERSIONFOLDER/resources/app/out/cli.js")
# use the Remote WSL extension if installed # use the Remote WSL extension if installed
WSL_EXT_ID="ms-vscode-remote.remote-wsl" WSL_EXT_ID="ms-vscode-remote.remote-wsl"

View File

@@ -279,7 +279,12 @@ export async function main(desc: ProductDescription, args: string[]): Promise<vo
} else { } else {
const cliCwd = dirname(cliCommand); const cliCwd = dirname(cliCommand);
const env = { ...process.env, ELECTRON_RUN_AS_NODE: '1' }; const env = { ...process.env, ELECTRON_RUN_AS_NODE: '1' };
const versionFolder = desc.commit.substring(0, 10);
if (fs.existsSync(join(cliCwd, versionFolder))) {
newCommandline.unshift(`${versionFolder}/resources/app/out/cli.js`);
} else {
newCommandline.unshift('resources/app/out/cli.js'); newCommandline.unshift('resources/app/out/cli.js');
}
if (verbose) { if (verbose) {
console.log(`Invoking: cd "${cliCwd}" && ELECTRON_RUN_AS_NODE=1 "${cliCommand}" "${newCommandline.join('" "')}"`); console.log(`Invoking: cd "${cliCwd}" && ELECTRON_RUN_AS_NODE=1 "${cliCommand}" "${newCommandline.join('" "')}"`);
} }