Skip to content

Commit 16835bb

Browse files
committed
fix xwin downloading on macos
1 parent ea3cbc4 commit 16835bb

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

src/sdk.rs

+10-2
Original file line numberDiff line numberDiff line change
@@ -738,8 +738,16 @@ fn download_xwin(dest: &Path) -> Result<(), Box<dyn std::error::Error>> {
738738
.iter()
739739
.find(|value| {
740740
value.get("name").is_some_and(|v| {
741-
v.as_str()
742-
.is_some_and(|v| v.ends_with("x86_64-unknown-linux-musl.tar.gz"))
741+
v.as_str().is_some_and(|v| {
742+
v.ends_with(
743+
#[cfg(all(target_os = "macos", target_arch = "aarch64"))]
744+
"aarch64-apple-darwin.tar.gz",
745+
#[cfg(all(target_os = "macos", target_arch = "x86_64"))]
746+
"x86_64-apple-darwin.tar.gz",
747+
#[cfg(not(target_os = "macos"))]
748+
"x86_64-unknown-linux-musl.tar.gz",
749+
)
750+
})
743751
})
744752
});
745753

0 commit comments

Comments
 (0)