Skip to content

Commit a63659b

Browse files
author
Veetaha
committed
vscode: replaced unwrapNotNil() with ! as per @matklad
1 parent 7a09274 commit a63659b

File tree

3 files changed

+3
-21
lines changed

3 files changed

+3
-21
lines changed

editors/code/package-lock.json

Lines changed: 0 additions & 13 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

editors/code/package.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,6 @@
2727
"jsonc-parser": "^2.1.0",
2828
"node-fetch": "^2.6.0",
2929
"throttle-debounce": "^2.1.0",
30-
"ts-not-nil": "^1.0.1",
3130
"vscode-languageclient": "^6.1.0"
3231
},
3332
"devDependencies": {

editors/code/src/installation/language_server.ts

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
import { unwrapNotNil } from "ts-not-nil";
21
import { spawnSync } from "child_process";
32
import * as vscode from "vscode";
43
import * as path from "path";
@@ -12,12 +11,9 @@ import { downloadFile } from "./download_file";
1211
export async function downloadLatestLanguageServer(
1312
{file: artifactFileName, dir: installationDir, repo}: BinarySource.GithubRelease
1413
) {
15-
const binaryMetadata = await fetchLatestArtifactMetadata(repo, artifactFileName);
16-
17-
const {
18-
releaseName,
19-
downloadUrl
20-
} = unwrapNotNil(binaryMetadata, `Latest GitHub release lacks "${artifactFileName}" file`);
14+
const { releaseName, downloadUrl } = (await fetchLatestArtifactMetadata(
15+
repo, artifactFileName
16+
))!;
2117

2218
await fs.mkdir(installationDir).catch(err => assert.strictEqual(
2319
err?.code,

0 commit comments

Comments
 (0)