diff options
author | Martin Aeschlimann <martinae@microsoft.com> | 2022-01-21 14:11:47 +0300 |
---|---|---|
committer | Martin Aeschlimann <martinae@microsoft.com> | 2022-01-21 14:11:47 +0300 |
commit | f9cac7c28aded8131569cd1adf0f4a77bf73ef30 (patch) | |
tree | 7df23d3b654e3c3791182a44971f4905a29cd13e /resources | |
parent | 8047f9c877930f2bc7122a8e53984c994effd9e2 (diff) |
adopt --server-data-dir
Diffstat (limited to 'resources')
-rw-r--r-- | resources/server/bin-dev/code-server.js | 13 |
1 files changed, 4 insertions, 9 deletions
diff --git a/resources/server/bin-dev/code-server.js b/resources/server/bin-dev/code-server.js index dc2b6a7eebe..26b93a03465 100644 --- a/resources/server/bin-dev/code-server.js +++ b/resources/server/bin-dev/code-server.js @@ -21,7 +21,8 @@ const args = minimist(process.argv.slice(2), { 'host', 'port', 'driver', - 'connection-token' + 'connection-token', + 'server-data-dir' ], }); @@ -38,7 +39,7 @@ const HOST = args['host'] ?? 'localhost'; const PORT = args['port'] ?? '9888'; const TOKEN = args['connection-token'] ?? String(crypto.randomInt(0xffffffff)); -if (args['connection-token'] === undefined && args['connection-token-file'] === undefined && !args['no-connection-token']) { +if (args['launch'] && args['connection-token'] === undefined && args['connection-token-file'] === undefined && !args['no-connection-token']) { serverArgs.push('--connection-token', TOKEN); } if (args['host'] === undefined) { @@ -48,13 +49,7 @@ if (args['port'] === undefined) { serverArgs.push('--port', PORT); } -if (args['driver']) { - // given a DRIVER, we auto-shutdown when tests are done - serverArgs.push('--enable-remote-auto-shutdown', '--remote-auto-shutdown-without-delay'); -} - const env = { ...process.env }; -env['VSCODE_AGENT_FOLDER'] = env['VSCODE_AGENT_FOLDER'] || path.join(os.homedir(), '.vscode-server-oss-dev'); env['NODE_ENV'] = 'development'; env['VSCODE_DEV'] = '1'; const entryPoint = path.join(__dirname, '..', '..', '..', 'out', 'server-main.js'); @@ -75,7 +70,7 @@ function startServer() { console.error(data.toString()); }); - proc.on('exit', () => process.exit()); + proc.on('exit', (code) => process.exit(code)); process.on('exit', () => proc.kill()); process.on('SIGINT', () => { |