diff options
Diffstat (limited to 'editors/code/src/installation')
-rw-r--r-- | editors/code/src/installation/language_server.ts | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/editors/code/src/installation/language_server.ts b/editors/code/src/installation/language_server.ts index e571cbc98..a169eae47 100644 --- a/editors/code/src/installation/language_server.ts +++ b/editors/code/src/installation/language_server.ts | |||
@@ -1,4 +1,3 @@ | |||
1 | import { unwrapNotNil } from "ts-not-nil"; | ||
2 | import { spawnSync } from "child_process"; | 1 | import { spawnSync } from "child_process"; |
3 | import * as vscode from "vscode"; | 2 | import * as vscode from "vscode"; |
4 | import * as path from "path"; | 3 | import * as path from "path"; |
@@ -12,12 +11,9 @@ import { downloadFile } from "./download_file"; | |||
12 | export async function downloadLatestLanguageServer( | 11 | export async function downloadLatestLanguageServer( |
13 | {file: artifactFileName, dir: installationDir, repo}: BinarySource.GithubRelease | 12 | {file: artifactFileName, dir: installationDir, repo}: BinarySource.GithubRelease |
14 | ) { | 13 | ) { |
15 | const binaryMetadata = await fetchLatestArtifactMetadata(repo, artifactFileName); | 14 | const { releaseName, downloadUrl } = (await fetchLatestArtifactMetadata( |
16 | 15 | repo, artifactFileName | |
17 | const { | 16 | ))!; |
18 | releaseName, | ||
19 | downloadUrl | ||
20 | } = unwrapNotNil(binaryMetadata, `Latest GitHub release lacks "${artifactFileName}" file`); | ||
21 | 17 | ||
22 | await fs.mkdir(installationDir).catch(err => assert.strictEqual( | 18 | await fs.mkdir(installationDir).catch(err => assert.strictEqual( |
23 | err?.code, | 19 | err?.code, |