mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-30 22:01:37 +00:00
vscode: replaced unwrapNotNil() with ! as per @matklad
This commit is contained in:
parent
7a09274e52
commit
a63659badb
3 changed files with 3 additions and 21 deletions
|
@ -1,4 +1,3 @@
|
|||
import { unwrapNotNil } from "ts-not-nil";
|
||||
import { spawnSync } from "child_process";
|
||||
import * as vscode from "vscode";
|
||||
import * as path from "path";
|
||||
|
@ -12,12 +11,9 @@ import { downloadFile } from "./download_file";
|
|||
export async function downloadLatestLanguageServer(
|
||||
{file: artifactFileName, dir: installationDir, repo}: BinarySource.GithubRelease
|
||||
) {
|
||||
const binaryMetadata = await fetchLatestArtifactMetadata(repo, artifactFileName);
|
||||
|
||||
const {
|
||||
releaseName,
|
||||
downloadUrl
|
||||
} = unwrapNotNil(binaryMetadata, `Latest GitHub release lacks "${artifactFileName}" file`);
|
||||
const { releaseName, downloadUrl } = (await fetchLatestArtifactMetadata(
|
||||
repo, artifactFileName
|
||||
))!;
|
||||
|
||||
await fs.mkdir(installationDir).catch(err => assert.strictEqual(
|
||||
err?.code,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue