mirror of
https://github.com/Microsoft/vscode
synced 2024-08-28 05:19:39 +00:00
rename connectionToken
to connection-token
This commit is contained in:
parent
66b1668b66
commit
8535fa1836
|
@ -61,7 +61,7 @@ if (ENABLE_SYNC) {
|
|||
}
|
||||
|
||||
// Connection Token
|
||||
serverArgs.push('--connectionToken', '00000');
|
||||
serverArgs.push('--connection-token', '00000');
|
||||
|
||||
// Server should really only listen from localhost
|
||||
serverArgs.push('--host', '127.0.0.1');
|
||||
|
|
|
@ -914,8 +914,8 @@ export class RemoteExtensionHostAgentServer extends Disposable {
|
|||
|
||||
function parseConnectionToken(args: ServerParsedArgs): { connectionToken: string; connectionTokenIsMandatory: boolean; } {
|
||||
if (args['connection-secret']) {
|
||||
if (args['connectionToken']) {
|
||||
console.warn(`Please do not use the argument connectionToken at the same time as connection-secret.`);
|
||||
if (args['connection-token']) {
|
||||
console.warn(`Please do not use the argument connection-token at the same time as connection-secret.`);
|
||||
process.exit(1);
|
||||
}
|
||||
let rawConnectionToken = fs.readFileSync(args['connection-secret']).toString();
|
||||
|
@ -926,7 +926,7 @@ function parseConnectionToken(args: ServerParsedArgs): { connectionToken: string
|
|||
}
|
||||
return { connectionToken: rawConnectionToken, connectionTokenIsMandatory: true };
|
||||
} else {
|
||||
return { connectionToken: args['connectionToken'] || generateUuid(), connectionTokenIsMandatory: false };
|
||||
return { connectionToken: args['connection-token'] || generateUuid(), connectionTokenIsMandatory: false };
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -11,7 +11,7 @@ import { IEnvironmentService, INativeEnvironmentService } from 'vs/platform/envi
|
|||
|
||||
export const serverOptions: OptionDescriptions<ServerParsedArgs> = {
|
||||
'port': { type: 'string' },
|
||||
'connectionToken': { type: 'string' },
|
||||
'connection-token': { type: 'string' },
|
||||
'connection-secret': { type: 'string', description: nls.localize('connection-secret', "Path to file that contains the connection token. This will require that all incoming connections know the secret.") },
|
||||
'host': { type: 'string' },
|
||||
'socket-path': { type: 'string' },
|
||||
|
@ -58,7 +58,7 @@ export const serverOptions: OptionDescriptions<ServerParsedArgs> = {
|
|||
|
||||
export interface ServerParsedArgs {
|
||||
port?: string;
|
||||
connectionToken?: string;
|
||||
'connection-token'?: string;
|
||||
/**
|
||||
* A path to a filename which will be read on startup.
|
||||
* Consider placing this file in a folder readable only by the same user (a `chmod 0700` directory).
|
||||
|
|
Loading…
Reference in a new issue