jdx/mise · error
Unsupported OS '{}'. Supported: linux, macos, windows, andro
Error message
Unsupported OS '{}'. Supported: linux, macos, windows, android What it means
After parsing, Platform::validate rejects OS values outside {linux, macos, windows, android}. The canonical trap is Apple platforms: mise says macos where Rust/Go toolchains and `uname` say darwin or osx, and win/win32 for Windows also fail. It fires while parsing `mise lock -p` values or the lockfile_platforms setting.
Source
Thrown at src/platform.rs:79
}
pub(crate) fn libc(&self) -> Option<&str> {
self.qualifier
.as_deref()?
.split('-')
.find_map(|part| match part {
"gnu" | "glibc" => Some("gnu"),
"musl" => Some("musl"),
_ => None,
})
}
/// Validate that this platform is supported
pub(crate) fn validate(&self) -> Result<()> {
// Validate OS
match self.os.as_str() {
"linux" | "macos" | "windows" | "android" => {}
_ => bail!(
"Unsupported OS '{}'. Supported: linux, macos, windows, android",
self.os
),
}
// Validate architecture
match self.arch.as_str() {
"x64" | "arm64" | "x86" | "loongarch64" | "riscv64" => {}
_ => bail!(
"Unsupported architecture '{}'. Supported: x64, arm64, x86, loongarch64, riscv64",
self.arch
),
}
// Validate qualifier if present
if let Some(qualifier) = &self.qualifier {
match qualifier.as_str() {
"gnu" | "glibc" | "musl" | "msvc" | "baseline" | "musl-baseline" => {}View on GitHub (pinned to 6f52dcdf99)
Solutions
- Use macos for Apple platforms (darwin and osx both map to macos).
- Use windows in full (not win or win32).
- Drop OSes outside linux/macos/windows/android from the platform list — they are not lockfile dimensions mise supports.
Example fix
# before mise lock -p darwin-arm64 -p win-x64 # after mise lock -p macos-arm64 -p windows-x64
Defensive patterns
Strategy: validation
Validate before calling
os="${PLATFORM%%-*}"
case "$os" in
linux|macos|windows|android) ;;
*) echo "unsupported OS: $os (mise uses macos, not darwin/osx)"; exit 2;;
esac Type guard
fn supported_os(s: &str) -> bool {
matches!(s, "linux" | "macos" | "windows" | "android")
} Prevention
- Remember mise's vocabulary: macos (never darwin/osx), windows (never win/win32).
- Map CI runner labels (macos-*, osx, win32) to mise names in one helper function.
- Validate the platform list before committing config changes.
When it happens
Trigger: `mise lock -p darwin-arm64`, `-p osx-x64`, `-p win-x64`, or `-p freebsd-x64` — the first hyphen-separated segment is not in the allowlist.
Common situations: Porting GOOS/Rust target names into lockfile config; CI matrices generating "osx" from GitHub Actions runner labels; assuming freebsd/ios are supported.
Understand the failure class
Background: "unsupported platform" / "not supported on this platform" errors: what they mean and how to fix them — this error's family across 47 libraries.
Related errors
- Invalid platform format '{}'. Expected 'os-arch' or 'os-arch
- Unsupported architecture '{}'. Supported: x64, arm64, x86, l
- Unsupported qualifier '{}'. Supported: gnu, glibc, musl, msv
- trimPrefix requires exactly 2 arguments
- trimSuffix requires exactly 2 arguments
AI-assisted analysis of jdx/mise@6f52dcdf99 (2026-08-22).
Data as JSON: /api/errors/ec7eaec22d674e66.
Report an issue: GitHub.