jdx/mise · error

bootstrap packages where currently supports brew: formulae…

Error message

bootstrap packages where currently supports brew: formulae; unsupported package {}

What it means

`mise system where` currently only supports Homebrew formulae for package lookup. After parsing the spec, run() checks that the manager is exactly "brew"; any other manager (brew-cask, npm-style specs, bare names rejected by parse_spec, etc.) bails with this message listing the supported syntax.

Solutions

  1. Use a brew formula spec: `mise system where brew:<formula>` or `mise system where brew:<owner>/<tap>/<formula>`
  2. If the target is a cask, there is no `where` support yet — locate it via `brew --prefix <cask>` manually or `brew info`
  3. Check the exact spec format; the wrap_err context mandates the `brew:` prefix

Example fix

// before
mise system where brew-cask:iterm2
// after
mise system where brew:iterm2   # or brew:homebrew/cask/iterm2 if supported by parse_spec
Defensive patterns

Strategy: validation

Validate before calling

case "$pkg" in brew:*) mise system where "$pkg" ;; *) echo 'use brew:<formula>' ;; esac

Prevention

When it happens

Trigger: Passing a package spec whose parsed manager is not `brew` — e.g. `mise system where brew-cask:firefox`, or a spec string that parse_spec maps to another manager — to `mise system where`.

Common situations: Users trying to look up cask install paths; users omitting the `brew:` prefix or using another manager prefix out of habit from other tooling.

Understand the failure class

Background: "Must be a positive integer", "Invalid value", "Unsupported": the invalid-argument-value error family, when a library rejects the value you pass — this error's family across 35 libraries.

Related errors


AI-assisted analysis of jdx/mise@533346cc37 (2026-09-17). Data as JSON: /api/errors/8c3f66a1514b0564. Report an issue: GitHub.

Appendix: source

Thrown at src/cli/system/where.rs:27

/// canonical installed formula name. Qualified names use the final component
/// as the local rack name; aliases and tap provenance are not resolved.
/// Settings come from environment variables and global CLI options only.
/// The returned opt path follows upgrades and may change after this lookup.
/// Missing or invalid installations produce empty stdout and a nonzero exit status.
#[derive(Debug, usage_rs::Args)]
#[usage(verbatim_doc_comment)]
pub(crate) struct SystemWhere {
    /// Explicit brew formula to locate
    package: String,
}

impl SystemWhere {
    /// Print one stable opt path after local validation succeeds; return errors before writing stdout.
    pub(crate) async fn run(self) -> Result<()> {
        let (manager, name) = crate::system::parse_spec(&self.package)
            .wrap_err("use brew:<formula> or brew:<owner>/<tap>/<formula> for package lookup")?;
        if manager != "brew" {
            bail!(
                "bootstrap packages where currently supports brew: formulae; unsupported package {}",
                self.package
            );
        }
        #[cfg(unix)]
        {
            use crate::system::packages::{SystemPackageManager, brew};
            if !brew::BrewManager::new().is_available() {
                bail!("brew:{name}: package lookup supports macOS arm64 and Linux x86_64/arm64");
            }
            let root = brew::package_root(&name)?;
            miseprintln!("{}", path_for_output(&root)?);
            Ok(())
        }
        #[cfg(not(unix))]
        bail!("brew:{name}: package lookup supports macOS arm64 and Linux x86_64/arm64")
    }
}

View on GitHub (pinned to 533346cc37)