mirror of
https://github.com/microsoft/vscode.git
synced 2026-05-19 06:39:55 +01:00
ELECTRON_RUN_AS_NODE is removed too late before bootstrap-amd.js redefines 'fs' (fix #225139) (#225141)
This commit is contained in:
+4
-3
@@ -6,6 +6,10 @@
|
||||
// @ts-check
|
||||
'use strict';
|
||||
|
||||
// Keep bootstrap-amd.js from redefining 'fs'.
|
||||
// TODO@esm this needs to be revisited in ESM
|
||||
delete process.env['ELECTRON_RUN_AS_NODE'];
|
||||
|
||||
// ESM-comment-begin
|
||||
const path = require('path');
|
||||
const bootstrapNode = require('./bootstrap-node');
|
||||
@@ -26,9 +30,6 @@ const product = require('./bootstrap-meta').product;
|
||||
|
||||
async function start() {
|
||||
|
||||
// Keep bootstrap-amd.js from redefining 'fs'.
|
||||
delete process.env['ELECTRON_RUN_AS_NODE'];
|
||||
|
||||
// NLS
|
||||
const nlsConfiguration = await resolveNLSConfiguration({ userLocale: 'en', osLocale: 'en', commit: product.commit, userDataPath: '', nlsMetadataPath: __dirname });
|
||||
process.env['VSCODE_NLS_CONFIG'] = JSON.stringify(nlsConfiguration); // required for `bootstrap-amd` to pick up NLS messages
|
||||
|
||||
+4
-1
@@ -11,6 +11,10 @@
|
||||
* @import { IServerAPI } from './vs/server/node/remoteExtensionHostAgentServer'
|
||||
*/
|
||||
|
||||
// Keep bootstrap-amd.js from redefining 'fs'.
|
||||
// TODO@esm this needs to be revisited in ESM
|
||||
delete process.env['ELECTRON_RUN_AS_NODE'];
|
||||
|
||||
// ESM-comment-begin
|
||||
const path = require('path');
|
||||
const http = require('http');
|
||||
@@ -279,7 +283,6 @@ async function findFreePort(host, start, end) {
|
||||
*/
|
||||
function loadCode(nlsConfiguration) {
|
||||
return new Promise((resolve, reject) => {
|
||||
delete process.env['ELECTRON_RUN_AS_NODE']; // Keep bootstrap-amd.js from redefining 'fs'.
|
||||
|
||||
/** @type {INLSConfiguration} */
|
||||
process.env['VSCODE_NLS_CONFIG'] = JSON.stringify(nlsConfiguration); // required for `bootstrap-amd` to pick up NLS messages
|
||||
|
||||
Reference in New Issue
Block a user