From ce26ad7c303d3d81d11c38e86871b44b132e2c28 Mon Sep 17 00:00:00 2001 From: Akash Satheesan Date: Wed, 5 May 2021 23:24:21 +0530 Subject: [PATCH] refactor(lib/vscode): move commit to global constant --- lib/vscode/src/vs/server/node/server.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lib/vscode/src/vs/server/node/server.ts b/lib/vscode/src/vs/server/node/server.ts index 645e73c82..a3708045d 100644 --- a/lib/vscode/src/vs/server/node/server.ts +++ b/lib/vscode/src/vs/server/node/server.ts @@ -58,6 +58,8 @@ import { REMOTE_TERMINAL_CHANNEL_NAME } from 'vs/workbench/contrib/terminal/comm import { REMOTE_FILE_SYSTEM_CHANNEL_NAME } from 'vs/workbench/services/remote/common/remoteAgentFileSystemChannel'; import { RemoteExtensionLogFileName } from 'vs/workbench/services/remote/common/remoteAgentService'; +const commit = product.commit || 'development'; + export class Vscode { public readonly _onDidClientConnect = new Emitter(); public readonly onDidClientConnect = this._onDidClientConnect.event; @@ -109,7 +111,7 @@ export class Vscode { remoteUserDataUri: transformer.transformOutgoing(URI.file(environment.userDataPath)), productConfiguration: product, nlsConfiguration: await getNlsConfiguration(environment.args.locale || await getLocaleFromConfig(environment.userDataPath), environment.userDataPath), - commit: product.commit || 'development', + commit, }; } @@ -255,7 +257,6 @@ export class Vscode { instantiationService.invokeFunction((accessor) => { instantiationService.createInstance(LogsDataCleaner); - const commit = typeof product.commit === 'string' ? product.commit : 'unknown'; let telemetryService: ITelemetryService; if (!environmentService.disableTelemetry) { telemetryService = new TelemetryService({