Skip to content

Commit

Permalink
fix: support x64-musl (#1109)
Browse files Browse the repository at this point in the history
* fix: support x64-musl
Yes, an easy fix as silly as bypassing the hardcoded check and then set `FNM_NODE_DIST_MIRROR` & `FNM_ARCH` in shell rc.

* Create poor-otters-cheer.md

---------

Co-authored-by: Gal Schlezinger <gal@spitfire.co.il>
  • Loading branch information
Vinfall and Schniz authored May 24, 2024
1 parent 463cc90 commit 8f3acbb
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
5 changes: 5 additions & 0 deletions .changeset/poor-otters-cheer.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"fnm": patch
---

support `x64-musl` arch by adding a `--arch x64-musl` to fnm env
3 changes: 3 additions & 0 deletions src/arch.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ use crate::version::Version;
pub enum Arch {
X86,
X64,
X64Musl,
Arm64,
Armv7l,
Ppc64le,
Expand Down Expand Up @@ -43,6 +44,7 @@ impl std::str::FromStr for Arch {
match s {
"x86" => Ok(Arch::X86),
"x64" => Ok(Arch::X64),
"x64-musl" => Ok(Arch::X64Musl),
"arm64" => Ok(Arch::Arm64),
"armv7l" => Ok(Arch::Armv7l),
"ppc64le" => Ok(Arch::Ppc64le),
Expand All @@ -58,6 +60,7 @@ impl std::fmt::Display for Arch {
let arch_str = match self {
Arch::X86 => String::from("x86"),
Arch::X64 => String::from("x64"),
Arch::X64Musl => String::from("x64-musl"),
Arch::Arm64 => String::from("arm64"),
Arch::Armv7l => String::from("armv7l"),
Arch::Ppc64le => String::from("ppc64le"),
Expand Down

0 comments on commit 8f3acbb

Please sign in to comment.