diff options
author | Veetaha <[email protected]> | 2020-02-09 11:59:27 +0000 |
---|---|---|
committer | Veetaha <[email protected]> | 2020-02-09 11:59:27 +0000 |
commit | a63659badb75d22ad834b7524e77505790c10dd0 (patch) | |
tree | 4f742866f54618ead92a8bc6f018393ed550954c /editors/code/src/installation | |
parent | 7a09274e52dc00f7d4e3a040686aa1eb1e075671 (diff) |
vscode: replaced unwrapNotNil() with ! as per @matklad
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, |