Skip to content

Commit ed285f9

Browse files
authored
Merge pull request #1830 from cdr/fix-config
Initialize config and use correct settings path
2 parents 364f9dd + 1b7d4b5 commit ed285f9

File tree

1 file changed

+11
-7
lines changed

1 file changed

+11
-7
lines changed

ci/dev/vscode.patch

+11-7
Original file line numberDiff line numberDiff line change
@@ -1462,7 +1462,7 @@ index 0000000000..0a9c95d50e
14621462
+}
14631463
diff --git a/src/vs/server/node/channel.ts b/src/vs/server/node/channel.ts
14641464
new file mode 100644
1465-
index 0000000000..23058670f3
1465+
index 0000000000..1166835371
14661466
--- /dev/null
14671467
+++ b/src/vs/server/node/channel.ts
14681468
@@ -0,0 +1,343 @@
@@ -1709,7 +1709,7 @@ index 0000000000..23058670f3
17091709
+ connectionToken: this.connectionToken,
17101710
+ appRoot: URI.file(this.environment.appRoot),
17111711
+ appSettingsHome: this.environment.appSettingsHome,
1712-
+ settingsPath: this.environment.machineSettingsResource,
1712+
+ settingsPath: this.environment.settingsResource,
17131713
+ logsPath: URI.file(this.environment.logsPath),
17141714
+ extensionsPath: URI.file(this.environment.extensionsPath!),
17151715
+ extensionHostLogsPath: URI.file(path.join(this.environment.logsPath, 'extension-host')),
@@ -2532,10 +2532,10 @@ index 0000000000..3c74512192
25322532
+}
25332533
diff --git a/src/vs/server/node/server.ts b/src/vs/server/node/server.ts
25342534
new file mode 100644
2535-
index 0000000000..8b82854426
2535+
index 0000000000..80616dd11c
25362536
--- /dev/null
25372537
+++ b/src/vs/server/node/server.ts
2538-
@@ -0,0 +1,277 @@
2538+
@@ -0,0 +1,281 @@
25392539
+import * as net from 'net';
25402540
+import * as path from 'path';
25412541
+import * as fs from 'fs';
@@ -2738,8 +2738,8 @@ index 0000000000..8b82854426
27382738
+
27392739
+ private async initializeServices(args: ParsedArgs): Promise<void> {
27402740
+ const environmentService = new EnvironmentService(args, process.execPath);
2741-
+ // https://github.com/cdr/code-server/issues/1693
2742-
+ fs.mkdirSync(environmentService.globalStorageHome, { recursive: true });
2741+
+ // https://github.com/cdr/code-server/issues/1693
2742+
+ fs.mkdirSync(environmentService.globalStorageHome, { recursive: true });
27432743
+
27442744
+ const logService = new SpdLogService(RemoteExtensionLogFileName, environmentService.logsPath, getLogLevel(environmentService));
27452745
+ const fileService = new FileService(logService);
@@ -2758,7 +2758,11 @@ index 0000000000..8b82854426
27582758
+
27592759
+ this.services.set(ILogService, logService);
27602760
+ this.services.set(IEnvironmentService, environmentService);
2761-
+ this.services.set(IConfigurationService, new SyncDescriptor(ConfigurationService, [environmentService.machineSettingsResource, fileService]));
2761+
+
2762+
+ const configurationService = new ConfigurationService(environmentService.settingsResource, fileService);
2763+
+ await configurationService.initialize();
2764+
+ this.services.set(IConfigurationService, configurationService);
2765+
+
27622766
+ this.services.set(IRequestService, new SyncDescriptor(RequestService));
27632767
+ this.services.set(IFileService, fileService);
27642768
+ this.services.set(IProductService, { _serviceBrand: undefined, ...product });

0 commit comments

Comments
 (0)