jdx/mise · error
brew-cask:{}: only font-only casks without lifecycle hooks a
Error message
brew-cask:{}: only font-only casks without lifecycle hooks are supported on linux What it means
On Linux, this implementation only supports brew casks that consist solely of font artifacts and declare no preflight/postflight lifecycle hooks (neither structured steps nor Ruby hooks). validate_platform_support bails for anything else, because installing app bundles or running brew's shell lifecycle scripts is not supported outside macOS.
Source
Thrown at src/system/packages/brew/cask/artifacts.rs:106
pub(super) fn validate_platform_support(cask: &Cask, artifacts: &CaskArtifacts) -> Result<()> {
#[cfg(target_os = "linux")]
{
let font_only = !artifacts.fonts.is_empty()
&& artifacts.apps.is_empty()
&& artifacts.binaries.is_empty()
&& artifacts.command_wrappers.is_empty()
&& artifacts.pkgs.is_empty()
&& artifacts.installers.is_empty()
&& artifacts.generic.is_empty()
&& artifacts.completions.is_empty()
&& artifacts.generated_completions.is_empty()
&& artifacts.preflight_steps.is_empty()
&& artifacts.postflight_steps.is_empty()
&& !has_lifecycle_hook(cask, "preflight")
&& !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()))
}View on GitHub (pinned to afd2eddd3a)
Solutions
- Install the software via a native Linux channel instead: the brew formula (not cask), apt/dnf package, or a mise-supported backend (aqua:, github:, etc.).
- If the cask bundles fonts plus other artifacts, extract just the fonts manually or ask upstream for a fonts-only cask.
- Run the installation on a macOS machine; this restriction only applies to target_os = "linux".
- If it's your own cask, split fonts into a dedicated cask without preflight/postflight hooks so Linux installs succeed.
Example fix
// before: one cask mixing app + font with hooks
cask "myfont" do
app "MyApp.app"
font "MyFont.ttf"
preflight do
system_command "/usr/bin/touch", args: ["/tmp/x"]
end
end
// after: fonts-only cask, no hooks
cask "myfont" do
font "MyFont.ttf"
end Defensive patterns
Strategy: fallback
Validate before calling
import platform
if platform.system() == "Linux" and not cask_is_font_only(cask_token):
raise Skip(f"{cask_token}: non-font cask unsupported on linux") Try / catch
match validate_platform_support(&cask, &artifacts) {
Err(e) if e.to_string().contains("only font-only casks") => {
eprintln!("{}: install via formula/apt/github backend instead", cask.token);
fallback_native_install(&cask.token)?;
}
other => other?,
} Prevention
- On Linux hosts, restrict brew-cask installs to fonts-only casks.
- Route app/software installs to native backends (brew formula, apt, aqua:, github:) on Linux.
- Split mixed app+font casks so fonts get a dedicated hook-free cask.
- Check platform support with `mise ls` / backend docs before scripting cask installs.
When it happens
Trigger: Calling install_one_with_ancestors or platform_unavailable_state on Linux for a cask that has any non-font install artifact (app, pkg, binary, generic, etc.) or defines preflight/postflight steps or Ruby lifecycle hooks — e.g. linux_supports_font_only_casks / linux_rejects_non_font_casks test cases.
Common situations: Trying to install a macOS application cask (browser, editor, CLI wrapped in .app) from a Linux machine using mise's brew backend; casks whose fonts are accompanied by installer scripts; CI on Linux runners attempting macOS cask installs.
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
- brew-cask:{}: only font-only casks without lifecycle hooks a
- GitHub relay requires Linux or macOS
- per-host network filtering (--allow-net=<host>) is not suppo
- unsupported OS version: {os_ver}
- swift does not publish musl builds
AI-assisted analysis of jdx/mise@afd2eddd3a (2026-09-09).
Data as JSON: /api/errors/60f2827de7a4e9a3.
Report an issue: GitHub.