Skip to content

Commit

Permalink
windows: Fix package-version-server (#13821)
Browse files Browse the repository at this point in the history
Now, it can run on windows.

![Screenshot 2024-07-04
173832](https://github.com/zed-industries/zed/assets/14981363/d3c17fe3-6e79-46cd-b9a3-f6655109463c)


Release Notes:

- N/A
  • Loading branch information
JunkuiZhang committed Jul 4, 2024
1 parent 818e6e5 commit d450a1d
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions crates/languages/src/json.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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() {
Expand All @@ -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?;
Expand Down

0 comments on commit d450a1d

Please sign in to comment.