Skip to content

Commit 68ff71e

Browse files
committed
vscode: fix local devel
The value of releaseTag is not undefined, but null in actual package.json
1 parent 3d38d4d commit 68ff71e

File tree

2 files changed

+7
-5
lines changed

2 files changed

+7
-5
lines changed

editors/code/src/config.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ export class Config {
2121

2222
readonly package: {
2323
version: string;
24-
releaseTag: string | undefined;
24+
releaseTag: string | null;
2525
enableProposedApi: boolean | undefined;
2626
} = vscode.extensions.getExtension(this.extensionId)!.packageJSON;
2727

editors/code/src/main.ts

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -110,11 +110,13 @@ async function bootstrap(config: Config, state: PersistentState): Promise<string
110110
}
111111

112112
async function bootstrapExtension(config: Config, state: PersistentState): Promise<void> {
113-
if (config.package.releaseTag === undefined) return;
113+
if (config.package.releaseTag === null) return;
114114
if (config.channel === "stable") {
115115
if (config.package.releaseTag === NIGHTLY_TAG) {
116-
vscode.window.showWarningMessage(`You are running a nightly version of rust-analyzer extension.
117-
To switch to stable, uninstall the extension and re-install it from the marketplace`);
116+
void vscode.window.showWarningMessage(
117+
`You are running a nightly version of rust-analyzer extension. ` +
118+
`To switch to stable, uninstall the extension and re-install it from the marketplace`
119+
);
118120
}
119121
return;
120122
};
@@ -185,7 +187,7 @@ async function getServer(config: Config, state: PersistentState): Promise<string
185187
}
186188
return explicitPath;
187189
};
188-
if (config.package.releaseTag === undefined) return "rust-analyzer";
190+
if (config.package.releaseTag === null) return "rust-analyzer";
189191

190192
let binaryName: string | undefined = undefined;
191193
if (process.arch === "x64" || process.arch === "ia32") {

0 commit comments

Comments
 (0)