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.

remote: Set current_dir for cargo zigbuild cross-compilation (#53951)

Toni Alataloac02b1bf2409
diff --git a/crates/remote/src/transport.rs b/crates/remote/src/transport.rs
index 5d57b703287..1794a68839a 100644
--- a/crates/remote/src/transport.rs
+++ b/crates/remote/src/transport.rs
@@ -316,6 +316,7 @@ async fn build_remote_server_from_source(
log::info!("building remote binary from source for {triple} with Zig");
run_cmd(
new_command("cargo")
+ .current_dir(concat!(env!("CARGO_MANIFEST_DIR"), "/../.."))
.args([
"zigbuild",
"--package",
@@ -331,7 +332,8 @@ async fn build_remote_server_from_source(
)
.await?;
};
- let bin_path = Path::new("target")
+ let bin_path = Path::new(concat!(env!("CARGO_MANIFEST_DIR"), "/../.."))
+ .join("target")
.join("remote_server")
.join(&triple)
.join("debug")