mirror of
https://github.com/zed-industries/zed.git
synced 2024-12-28 01:05:01 +03:00
clangd: download the correct binary on Linux (#8820)
Release Notes: - Fixed clangd LSP download not working on Linux
This commit is contained in:
parent
98a1e87fbe
commit
94593dca4b
@ -1,10 +1,10 @@
|
||||
use anyhow::{anyhow, Context, Result};
|
||||
use anyhow::{anyhow, bail, Context, Result};
|
||||
use async_trait::async_trait;
|
||||
use futures::StreamExt;
|
||||
pub use language::*;
|
||||
use lsp::LanguageServerBinary;
|
||||
use smol::fs::{self, File};
|
||||
use std::{any::Any, path::PathBuf, sync::Arc};
|
||||
use std::{any::Any, env::consts, path::PathBuf, sync::Arc};
|
||||
use util::{
|
||||
async_maybe,
|
||||
fs::remove_matching,
|
||||
@ -26,7 +26,12 @@ impl super::LspAdapter for CLspAdapter {
|
||||
) -> Result<Box<dyn 'static + Send + Any>> {
|
||||
let release =
|
||||
latest_github_release("clangd/clangd", true, false, delegate.http_client()).await?;
|
||||
let asset_name = format!("clangd-mac-{}.zip", release.tag_name);
|
||||
let os_suffix = match consts::OS {
|
||||
"macos" => "mac",
|
||||
"linux" => "linux",
|
||||
other => bail!("Running on unsupported os: {other}"),
|
||||
};
|
||||
let asset_name = format!("clangd-{}-{}.zip", os_suffix, release.tag_name);
|
||||
let asset = release
|
||||
.assets
|
||||
.iter()
|
||||
|
Loading…
Reference in New Issue
Block a user