mirror of
https://github.com/rust-lang/rust.git
synced 2025-06-05 19:58:32 +00:00
Remove nightly release id from local storage for stable extensions
This commit is contained in:
parent
b8635a8e60
commit
be3e997ddf
@ -156,9 +156,11 @@ export async function deactivate() {
|
|||||||
async function bootstrap(config: Config, state: PersistentState): Promise<string> {
|
async function bootstrap(config: Config, state: PersistentState): Promise<string> {
|
||||||
await fs.mkdir(config.globalStoragePath, { recursive: true });
|
await fs.mkdir(config.globalStoragePath, { recursive: true });
|
||||||
|
|
||||||
|
if (config.package.releaseTag != NIGHTLY_TAG) {
|
||||||
|
await state.removeReleaseId();
|
||||||
|
}
|
||||||
await bootstrapExtension(config, state);
|
await bootstrapExtension(config, state);
|
||||||
const path = await bootstrapServer(config, state);
|
const path = await bootstrapServer(config, state);
|
||||||
|
|
||||||
return path;
|
return path;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -27,6 +27,9 @@ export class PersistentState {
|
|||||||
async updateReleaseId(value: number) {
|
async updateReleaseId(value: number) {
|
||||||
await this.globalState.update("releaseId", value);
|
await this.globalState.update("releaseId", value);
|
||||||
}
|
}
|
||||||
|
async removeReleaseId() {
|
||||||
|
await this.globalState.update("releaseId", undefined);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Version of the extension that installed the server.
|
* Version of the extension that installed the server.
|
||||||
|
Loading…
Reference in New Issue
Block a user