about summary refs log tree commit diff
path: root/editors/code/src
diff options
context:
space:
mode:
authorKirill Bulatov <mail4score@gmail.com>2021-05-23 11:49:34 +0300
committerKirill Bulatov <mail4score@gmail.com>2021-05-23 11:49:34 +0300
commitbe3e997ddffbcfb6c75fce47c803c7abd50ef21c (patch)
treeb1ef88516a1154519af134950deb9d29d2d8e441 /editors/code/src
parentb8635a8e6096768a5f2e382bed4af255896968f1 (diff)
downloadrust-be3e997ddffbcfb6c75fce47c803c7abd50ef21c.tar.gz
rust-be3e997ddffbcfb6c75fce47c803c7abd50ef21c.zip
Remove nightly release id from local storage for stable extensions
Diffstat (limited to 'editors/code/src')
-rw-r--r--editors/code/src/main.ts4
-rw-r--r--editors/code/src/persistent_state.ts3
2 files changed, 6 insertions, 1 deletions
diff --git a/editors/code/src/main.ts b/editors/code/src/main.ts
index ee2c50dc706..5db66df93d1 100644
--- a/editors/code/src/main.ts
+++ b/editors/code/src/main.ts
@@ -156,9 +156,11 @@ export async function deactivate() {
 async function bootstrap(config: Config, state: PersistentState): Promise<string> {
     await fs.mkdir(config.globalStoragePath, { recursive: true });
 
+    if (config.package.releaseTag != NIGHTLY_TAG) {
+        await state.removeReleaseId();
+    }
     await bootstrapExtension(config, state);
     const path = await bootstrapServer(config, state);
-
     return path;
 }
 
diff --git a/editors/code/src/persistent_state.ts b/editors/code/src/persistent_state.ts
index afb65258991..2519bd77ab7 100644
--- a/editors/code/src/persistent_state.ts
+++ b/editors/code/src/persistent_state.ts
@@ -27,6 +27,9 @@ export class PersistentState {
     async updateReleaseId(value: number) {
         await this.globalState.update("releaseId", value);
     }
+    async removeReleaseId() {
+        await this.globalState.update("releaseId", undefined);
+    }
 
     /**
      * Version of the extension that installed the server.