mirror of
https://github.com/microsoft/vscode.git
synced 2026-04-25 02:58:56 +01:00
Fixes #140997: Move server entry points to src/
This commit is contained in:
21
src/server-cli.js
Normal file
21
src/server-cli.js
Normal file
@@ -0,0 +1,21 @@
|
||||
/*---------------------------------------------------------------------------------------------
|
||||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
* Licensed under the MIT License. See License.txt in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
// @ts-check
|
||||
|
||||
const path = require('path');
|
||||
|
||||
// Keep bootstrap-amd.js from redefining 'fs'.
|
||||
delete process.env['ELECTRON_RUN_AS_NODE'];
|
||||
|
||||
if (process.env['VSCODE_DEV']) {
|
||||
// When running out of sources, we need to load node modules from remote/node_modules,
|
||||
// which are compiled against nodejs, not electron
|
||||
process.env['VSCODE_INJECT_NODE_MODULE_LOOKUP_PATH'] = process.env['VSCODE_INJECT_NODE_MODULE_LOOKUP_PATH'] || path.join(__dirname, '..', 'remote', 'node_modules');
|
||||
require('./bootstrap-node').injectNodeModuleLookupPath(process.env['VSCODE_INJECT_NODE_MODULE_LOOKUP_PATH']);
|
||||
} else {
|
||||
delete process.env['VSCODE_INJECT_NODE_MODULE_LOOKUP_PATH'];
|
||||
}
|
||||
require('./bootstrap-amd').load('vs/server/remoteCli');
|
||||
Reference in New Issue
Block a user