提交 9f9aa618 编写于 作者: J Joao Moreno

narrow down use of VSCODE_NLS_CONFIG

上级 3c84fe64
......@@ -123,13 +123,6 @@ export class Client implements IDisposable {
forkOpts.execArgv = ['--nolazy', '--debug-brk=' + this.options.debugBrk];
}
}
if (globalRequire && typeof globalRequire.getConfig === 'function') {
let nlsConfig = globalRequire.getConfig()['vs/nls'];
if (nlsConfig) {
forkOpts.env = forkOpts.env || clone(process.env);
forkOpts.env['VSCODE_NLS_CONFIG'] = JSON.stringify(nlsConfig);
}
}
this.child = cp.fork(this.modulePath, args, forkOpts);
this._client = new IPCClient({
......
......@@ -88,8 +88,9 @@ function getNLSConfiguration() {
// Load our code once ready
app.once('ready', function() {
var nlsConfig = getNLSConfiguration();
var loader = require('../../loader');
process.env['VSCODE_NLS_CONFIG'] = JSON.stringify(nlsConfig);
var loader = require('../../loader');
loader.config({
nodeRequire: require,
nodeMain: __filename,
......
......@@ -43,13 +43,6 @@ export function spawnSharedProcess(): cp.ChildProcess {
})
};
if (globalRequire && typeof globalRequire.getConfig === 'function') {
let nlsConfig = globalRequire.getConfig()['vs/nls'];
if (nlsConfig) {
opts.env['VSCODE_NLS_CONFIG'] = JSON.stringify(nlsConfig);
}
}
const result = cp.fork(boostrapPath, ['--type=SharedProcess'], opts);
// handshake
......
......@@ -114,14 +114,6 @@ class PluginHostProcessManager {
env: objects.mixin(objects.clone(process.env), { AMD_ENTRYPOINT: 'vs/workbench/node/pluginHostProcess', PIPE_LOGGING: 'true', VERBOSE_LOGGING: true })
};
// Make sure the nls configuration travels to the plugin host.
if (globalRequire && typeof globalRequire.getConfig === 'function') {
let nlsConfig = globalRequire.getConfig()['vs/nls'];
if (nlsConfig) {
opts.env['VSCODE_NLS_CONFIG'] = JSON.stringify(nlsConfig);
}
}
// Help in case we fail to start it
if (isDev) {
this.initializeTimer = setTimeout(() => {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册