diff options
| author | veetaha <veetaha2@gmail.com> | 2020-03-25 20:56:48 +0200 |
|---|---|---|
| committer | veetaha <veetaha2@gmail.com> | 2020-03-26 23:42:40 +0200 |
| commit | 68ff71e3ab91f01039bb30121d05d0289bb1bd1f (patch) | |
| tree | 518a1649a8125c77bcbd7d230593db0d5c42db08 /editors/code/src | |
| parent | 3d38d4dc9445de783d5efbc72fbdceaa094f23c3 (diff) | |
| download | rust-68ff71e3ab91f01039bb30121d05d0289bb1bd1f.tar.gz rust-68ff71e3ab91f01039bb30121d05d0289bb1bd1f.zip | |
vscode: fix local devel
The value of releaseTag is not undefined, but null in actual package.json
Diffstat (limited to 'editors/code/src')
| -rw-r--r-- | editors/code/src/config.ts | 2 | ||||
| -rw-r--r-- | editors/code/src/main.ts | 10 |
2 files changed, 7 insertions, 5 deletions
diff --git a/editors/code/src/config.ts b/editors/code/src/config.ts index 637aea27dae..e77462c1b00 100644 --- a/editors/code/src/config.ts +++ b/editors/code/src/config.ts @@ -21,7 +21,7 @@ export class Config { readonly package: { version: string; - releaseTag: string | undefined; + releaseTag: string | null; enableProposedApi: boolean | undefined; } = vscode.extensions.getExtension(this.extensionId)!.packageJSON; diff --git a/editors/code/src/main.ts b/editors/code/src/main.ts index de27d95353b..814ae9dc251 100644 --- a/editors/code/src/main.ts +++ b/editors/code/src/main.ts @@ -110,11 +110,13 @@ async function bootstrap(config: Config, state: PersistentState): Promise<string } async function bootstrapExtension(config: Config, state: PersistentState): Promise<void> { - if (config.package.releaseTag === undefined) return; + if (config.package.releaseTag === null) return; if (config.channel === "stable") { if (config.package.releaseTag === NIGHTLY_TAG) { - vscode.window.showWarningMessage(`You are running a nightly version of rust-analyzer extension. -To switch to stable, uninstall the extension and re-install it from the marketplace`); + void vscode.window.showWarningMessage( + `You are running a nightly version of rust-analyzer extension. ` + + `To switch to stable, uninstall the extension and re-install it from the marketplace` + ); } return; }; @@ -185,7 +187,7 @@ async function getServer(config: Config, state: PersistentState): Promise<string } return explicitPath; }; - if (config.package.releaseTag === undefined) return "rust-analyzer"; + if (config.package.releaseTag === null) return "rust-analyzer"; let binaryName: string | undefined = undefined; if (process.arch === "x64" || process.arch === "ia32") { |
