jdx/mise · warning
{err}
Error message
{err} What it means
In src/system/packages/brew/cask/artifacts.rs, platform_unavailable_state calls validate_platform_support(cask, artifacts) and, if it returns Err, wraps the error string into PackageState::unavailable(err.to_string()) (message rendered as `{err}`). This is not a crash: the cask is marked unavailable because its platform is not supported by the cask's declared artifacts.
Solutions
- Accept the unavailable state if the cask genuinely doesn't support your platform; choose an alternative package.
- Verify the cask's platform/artifact stanzas cover your OS/arch, or update the cask.
- Run on a supported platform (correct macOS version/architecture) if the package is required.
Defensive patterns
Strategy: type-guard
Validate before calling
// check the cask supports the current platform before requesting it
let state = package_state(&cask, &artifacts);
if state.is_unavailable() {
eprintln!("cask {} unavailable: {}", cask.token, state.reason());
} Type guard
fn cask_supports(cask: &Cask, os: Os, arch: Arch) -> bool {
cask.artifacts.iter().any(|a| a.supports(os, arch))
} Prevention
- Check cask platform stanzas (on_macos/on_arm/on_intel) before adding the package to config.
- Provide Linux/alternative-source equivalents for macOS-only casks.
- Gate macOS-only packages in CI with OS conditions.
When it happens
Trigger: Resolving package state for a Homebrew cask whose artifacts (e.g. `app`, `binary` stanzas gated on `on_macos`/`on_arm`/`on_intel`) do not cover the current platform, so validate_platform_support fails.
Common situations: Installing a macOS cask on Linux, an Intel-only cask on Apple Silicon, or a cask whose platform stanza excludes the running macOS version/architecture.
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
- app target is outside an allowed Applications directory
- artifact target has changed
- binary target is not an owned Caskroom symlink
- brew-cask: : cask metadata has no sha256
- brew-cask: : git only_path must name a directory within the…
AI-assisted analysis of jdx/mise@533346cc37 (2026-09-17).
Data as JSON: /api/errors/0cc9ea545fa00e04.
Report an issue: GitHub.
Appendix: source
Thrown at src/system/packages/brew/cask/artifacts.rs:122
&& !has_lifecycle_hook(cask, "postflight");
if !font_only {
bail!(
"brew-cask:{}: only font-only casks without lifecycle hooks are supported on linux",
cask.token
);
}
}
#[cfg(not(target_os = "linux"))]
let _ = (cask, artifacts);
Ok(())
}
pub(super) fn platform_unavailable_state(
cask: &Cask,
artifacts: &CaskArtifacts,
) -> Option<PackageState> {
validate_platform_support(cask, artifacts)
.err()
.map(|err| PackageState::unavailable(err.to_string()))
}
pub(super) fn declared_target(value: &Value) -> Option<String> {
value
.as_object()
.and_then(|o| o.get("target"))
.and_then(Value::as_str)
.map(str::to_string)
}
pub(super) fn artifact_target(value: &Value, values: &[Value]) -> Option<String> {
values
.get(1)
.and_then(|v| v.as_object())
.and_then(|o| o.get("target"))
.and_then(Value::as_str)
.map(str::to_string)View on GitHub (pinned to 533346cc37)