fix: restore VSCODE_CWD fix when resolving current working directory (#221373)

This commit is contained in:
Robo
2024-07-10 23:53:39 +09:00
committed by GitHub
parent c0cdcac061
commit 0dffaf0a35
+7 -7
View File
@@ -6,6 +6,13 @@
//@ts-check
'use strict';
// Delete `VSCODE_CWD` very early. We have seen
// reports where `code .` would use the wrong
// current working directory due to our variable
// somehow escaping to the parent shell
// (https://github.com/microsoft/vscode/issues/126399)
delete process.env['VSCODE_CWD'];
// ESM-comment-begin
const bootstrap = require('./bootstrap');
const bootstrapNode = require('./bootstrap-node');
@@ -25,13 +32,6 @@ const product = require('./bootstrap-meta').product;
// const __dirname = path.dirname(fileURLToPath(import.meta.url));
// ESM-uncomment-end
// Delete `VSCODE_CWD` very early. We have seen
// reports where `code .` would use the wrong
// current working directory due to our variable
// somehow escaping to the parent shell
// (https://github.com/microsoft/vscode/issues/126399)
delete process.env['VSCODE_CWD'];
async function start() {
// NLS