code-server dev script: fix open with connection token

This commit is contained in:
Martin Aeschlimann 2022-01-20 17:26:16 +01:00
parent d21a2baf86
commit dd0f0bda08
No known key found for this signature in database
GPG key ID: 2609A01E695523E3

View file

@ -15,6 +15,7 @@ const minimist = require('minimist');
const args = minimist(process.argv.slice(2), {
boolean: [
'help',
'launch'
],
string: [
'host',
@ -37,7 +38,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['connection-token'] === undefined && args['connection-token-file'] === undefined && !args['no-connection-token']) {
serverArgs.push('--connection-token', TOKEN);
}
if (args['host'] === undefined) {