vscode: Use options.base for update checking

See https://github.com/cdr/code-server/pull/2358#discussion_r529858749
This commit is contained in:
Anmol Sethi 2020-11-25 11:26:46 -05:00
parent 7282ebf436
commit 27f0f195a8
No known key found for this signature in database
GPG Key ID: 8CEF1878FF10ADEB
1 changed files with 4 additions and 4 deletions

View File

@ -813,7 +813,7 @@ new file mode 100644
index 0000000000000000000000000000000000000000..ead6a3cd5e98fdde074f19ee5043f152ed407146
--- /dev/null
+++ b/src/vs/server/browser/client.ts
@@ -0,0 +1,240 @@
@@ -0,0 +1,239 @@
+import { Emitter } from 'vs/base/common/event';
+import { URI } from 'vs/base/common/uri';
+import { localize } from 'vs/nls';
@ -967,8 +967,7 @@ index 0000000000000000000000000000000000000000..ead6a3cd5e98fdde074f19ee5043f152
+
+ const logService = (services.get(ILogService) as ILogService);
+ const storageService = (services.get(IStorageService) as IStorageService);
+ // We set this here first in case the path changes.
+ const updateCheckEndpoint = path.join(window.location.pathname, '/update/check');
+ const updateCheckEndpoint = path.join(options.base, "/update/check")
+ const getUpdate = async (): Promise<void> => {
+ logService.debug('Checking for update...');
+
@ -1449,13 +1448,14 @@ new file mode 100644
index 0000000000000000000000000000000000000000..0a4a91e5e36bda7f888feedda348aaff5fe32d27
--- /dev/null
+++ b/src/vs/server/ipc.d.ts
@@ -0,0 +1,131 @@
@@ -0,0 +1,132 @@
+/**
+ * External interfaces for integration into code-server over IPC. No vs imports
+ * should be made in this file.
+ */
+export interface Options {
+ disableTelemetry: boolean
+ base: string
+}
+
+export interface InitMessage {