vscode: Use options.base for update checking
See https://github.com/cdr/code-server/pull/2358#discussion_r529858749
This commit is contained in:
parent
7282ebf436
commit
27f0f195a8
@ -813,7 +813,7 @@ new file mode 100644
|
|||||||
index 0000000000000000000000000000000000000000..ead6a3cd5e98fdde074f19ee5043f152ed407146
|
index 0000000000000000000000000000000000000000..ead6a3cd5e98fdde074f19ee5043f152ed407146
|
||||||
--- /dev/null
|
--- /dev/null
|
||||||
+++ b/src/vs/server/browser/client.ts
|
+++ b/src/vs/server/browser/client.ts
|
||||||
@@ -0,0 +1,240 @@
|
@@ -0,0 +1,239 @@
|
||||||
+import { Emitter } from 'vs/base/common/event';
|
+import { Emitter } from 'vs/base/common/event';
|
||||||
+import { URI } from 'vs/base/common/uri';
|
+import { URI } from 'vs/base/common/uri';
|
||||||
+import { localize } from 'vs/nls';
|
+import { localize } from 'vs/nls';
|
||||||
@ -967,8 +967,7 @@ index 0000000000000000000000000000000000000000..ead6a3cd5e98fdde074f19ee5043f152
|
|||||||
+
|
+
|
||||||
+ const logService = (services.get(ILogService) as ILogService);
|
+ const logService = (services.get(ILogService) as ILogService);
|
||||||
+ const storageService = (services.get(IStorageService) as IStorageService);
|
+ const storageService = (services.get(IStorageService) as IStorageService);
|
||||||
+ // We set this here first in case the path changes.
|
+ const updateCheckEndpoint = path.join(options.base, "/update/check")
|
||||||
+ const updateCheckEndpoint = path.join(window.location.pathname, '/update/check');
|
|
||||||
+ const getUpdate = async (): Promise<void> => {
|
+ const getUpdate = async (): Promise<void> => {
|
||||||
+ logService.debug('Checking for update...');
|
+ logService.debug('Checking for update...');
|
||||||
+
|
+
|
||||||
@ -1449,13 +1448,14 @@ new file mode 100644
|
|||||||
index 0000000000000000000000000000000000000000..0a4a91e5e36bda7f888feedda348aaff5fe32d27
|
index 0000000000000000000000000000000000000000..0a4a91e5e36bda7f888feedda348aaff5fe32d27
|
||||||
--- /dev/null
|
--- /dev/null
|
||||||
+++ b/src/vs/server/ipc.d.ts
|
+++ 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
|
+ * External interfaces for integration into code-server over IPC. No vs imports
|
||||||
+ * should be made in this file.
|
+ * should be made in this file.
|
||||||
+ */
|
+ */
|
||||||
+export interface Options {
|
+export interface Options {
|
||||||
+ disableTelemetry: boolean
|
+ disableTelemetry: boolean
|
||||||
|
+ base: string
|
||||||
+}
|
+}
|
||||||
+
|
+
|
||||||
+export interface InitMessage {
|
+export interface InitMessage {
|
||||||
|
Reference in New Issue
Block a user