aboutsummaryrefslogtreecommitdiff
path: root/editors/code/src/installation
diff options
context:
space:
mode:
authorVeetaha <[email protected]>2020-02-09 11:59:27 +0000
committerVeetaha <[email protected]>2020-02-09 11:59:27 +0000
commita63659badb75d22ad834b7524e77505790c10dd0 (patch)
tree4f742866f54618ead92a8bc6f018393ed550954c /editors/code/src/installation
parent7a09274e52dc00f7d4e3a040686aa1eb1e075671 (diff)
vscode: replaced unwrapNotNil() with ! as per @matklad
Diffstat (limited to 'editors/code/src/installation')
-rw-r--r--editors/code/src/installation/language_server.ts10
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 @@
1import { unwrapNotNil } from "ts-not-nil";
2import { spawnSync } from "child_process"; 1import { spawnSync } from "child_process";
3import * as vscode from "vscode"; 2import * as vscode from "vscode";
4import * as path from "path"; 3import * as path from "path";
@@ -12,12 +11,9 @@ import { downloadFile } from "./download_file";
12export async function downloadLatestLanguageServer( 11export 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,