Skip to content

armgit / zed

Public Imported from GitHub
0

Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.

windows: Fix `package-version-server` (#13821)

张小白d450a1d9e6b1
diff --git a/crates/languages/src/json.rs b/crates/languages/src/json.rs
index 11e67c15ce9..9890936dba2 100644
--- a/crates/languages/src/json.rs
+++ b/crates/languages/src/json.rs
@@ -317,8 +317,11 @@ impl LspAdapter for NodeVersionAdapter {
delegate: &dyn LspAdapterDelegate,
) -> Result<LanguageServerBinary> {
let version = latest_version.downcast::<GitHubLspBinaryVersion>().unwrap();
- let destination_path =
- container_dir.join(format!("package-version-server-{}", version.name));
+ let destination_path = container_dir.join(format!(
+ "package-version-server-{}{}",
+ version.name,
+ std::env::consts::EXE_SUFFIX
+ ));
let destination_container_path =
container_dir.join(format!("package-version-server-{}-tmp", version.name));
if fs::metadata(&destination_path).await.is_err() {
@@ -340,7 +343,10 @@ impl LspAdapter for NodeVersionAdapter {
}
fs::copy(
- destination_container_path.join("package-version-server"),
+ destination_container_path.join(format!(
+ "package-version-server{}",
+ std::env::consts::EXE_SUFFIX
+ )),
&destination_path,
)
.await?;