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, mise's brew-cask support only handles casks that install fonts and nothing else — no apps, binaries, pkgs, installers, generic artifacts, completions, or preflight/postflight lifecycle hooks. validate_platform_support checks exactly that shape under cfg(target_os = "linux") and bails with the cask token otherwise, because macOS GUI install machinery (.app bundles, pkgs, launchservices) cannot be reproduced on Linux.
Source
Thrown at src/system/packages/brew/cask.rs:5047
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(())
}
fn platform_unavailable_state(cask: &Cask, artifacts: &CaskArtifacts) -> Option<PackageState> {
validate_platform_support(cask, artifacts)
.err()
.map(|err| PackageState::unavailable(err.to_string()))
}
fn artifact_target(value: &Value, values: &[Value]) -> Option<String> {
valuesView on GitHub (pinned to 6f52dcdf99)
Solutions
- On Linux, remove or gate the brew-cask entry (e.g. move it into a macOS-specific config such as a `[tools]` section scoped by platform, or use mise's per-OS config files).
- Install the tool through a native channel on Linux: a brew formula if the CLI exists as one, an aqua/github backend, or the system package manager.
- Confirm the cask really is non-font (brew info --cask): if it is fonts-only without hooks it should pass — a failure then worth reporting as a bug.
Example fix
# before — shared mise.toml breaks Linux [tools] "brew-cask:visual-studio-code" = "latest" # after — scope cask to macOS via per-platform config (mise.macos.toml or darwin guard) # mise.linux.toml keeps native tools only
Defensive patterns
Strategy: validation
Validate before calling
# keep macOS-only casks out of Linux configs if [ "$(uname -s)" != "Darwin" ]; then grep -q 'brew-cask:' mise.toml && echo 'move brew-cask entries to a macOS-specific config (e.g. mise.macos.toml)' fi
Prevention
- Split tool lists per OS (mise.macos.toml / mise.linux.toml) instead of one shared mise.toml.
- On Linux, use native backends (aqua, github, cargo) for tools pinned as brew-casks on macOS.
- Treat any brew-cask entry on Linux as suspect unless it is fonts-only.
When it happens
Trigger: Running `mise use brew-cask:<token>` / `mise install` for a standard macOS app cask on a Linux machine: the artifact inventory contains apps/binaries/pkgs or the cask declares preflight/postflight hooks, failing the font_only conjunction at src/system/packages/brew/cask.rs:5047.
Common situations: Shared mise.toml between a Mac and a Linux box pinning a brew-cask; CI on Linux inheriting a teammate's cask entries; font casks that also ship a helper binary (disqualified by the non-empty binaries list).
Related errors
- brew-cask: completion executable '{}' is ambiguous: {}
- brew-cask: failed to generate {} completions from {}: {}
- brew-cask: completion target '{}' must not contain '..'
- brew-cask: invalid completion target '{target_name}'
- brew-cask: invalid completion target '{}'
AI-assisted analysis of jdx/mise@6f52dcdf99 (2026-08-22).
Data as JSON: /api/errors/1ba94172c5b7c77e.
Report an issue: GitHub.