From be3e997ddffbcfb6c75fce47c803c7abd50ef21c Mon Sep 17 00:00:00 2001 From: Kirill Bulatov Date: Sun, 23 May 2021 11:49:34 +0300 Subject: Remove nightly release id from local storage for stable extensions --- editors/code/src/main.ts | 4 +++- editors/code/src/persistent_state.ts | 3 +++ 2 files changed, 6 insertions(+), 1 deletion(-) (limited to 'editors/code/src') diff --git a/editors/code/src/main.ts b/editors/code/src/main.ts index ee2c50dc7..5db66df93 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 { 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 afb652589..2519bd77a 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. -- cgit v1.2.3