{"record":{"id":"8c3f66a1514b0564","repo":"jdx/mise","slug":"bootstrap-packages-where-currently-supports-brew-formulae","errorCode":null,"errorMessage":"bootstrap packages where currently supports brew: formulae; unsupported package {}","messagePattern":"bootstrap packages where currently supports brew: formulae; unsupported package (.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src/cli/system/where.rs","lineNumber":27,"sourceCode":"/// canonical installed formula name. Qualified names use the final component\n/// as the local rack name; aliases and tap provenance are not resolved.\n/// Settings come from environment variables and global CLI options only.\n/// The returned opt path follows upgrades and may change after this lookup.\n/// Missing or invalid installations produce empty stdout and a nonzero exit status.\n#[derive(Debug, usage_rs::Args)]\n#[usage(verbatim_doc_comment)]\npub(crate) struct SystemWhere {\n    /// Explicit brew formula to locate\n    package: String,\n}\n\nimpl SystemWhere {\n    /// Print one stable opt path after local validation succeeds; return errors before writing stdout.\n    pub(crate) async fn run(self) -> Result<()> {\n        let (manager, name) = crate::system::parse_spec(&self.package)\n            .wrap_err(\"use brew:<formula> or brew:<owner>/<tap>/<formula> for package lookup\")?;\n        if manager != \"brew\" {\n            bail!(\n                \"bootstrap packages where currently supports brew: formulae; unsupported package {}\",\n                self.package\n            );\n        }\n        #[cfg(unix)]\n        {\n            use crate::system::packages::{SystemPackageManager, brew};\n            if !brew::BrewManager::new().is_available() {\n                bail!(\"brew:{name}: package lookup supports macOS arm64 and Linux x86_64/arm64\");\n            }\n            let root = brew::package_root(&name)?;\n            miseprintln!(\"{}\", path_for_output(&root)?);\n            Ok(())\n        }\n        #[cfg(not(unix))]\n        bail!(\"brew:{name}: package lookup supports macOS arm64 and Linux x86_64/arm64\")\n    }\n}","sourceCodeStart":9,"sourceCodeEnd":45,"githubUrl":"https://github.com/jdx/mise/blob/533346cc374382b41ec5ff70536252b2e96e725c/src/cli/system/where.rs#L9-L45","documentation":"`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.","triggerScenarios":"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`.","commonSituations":"Users trying to look up cask install paths; users omitting the `brew:` prefix or using another manager prefix out of habit from other tooling.","solutions":["Use a brew formula spec: `mise system where brew:<formula>` or `mise system where brew:<owner>/<tap>/<formula>`","If the target is a cask, there is no `where` support yet — locate it via `brew --prefix <cask>` manually or `brew info`","Check the exact spec format; the wrap_err context mandates the `brew:` prefix"],"exampleFix":"// before\nmise system where brew-cask:iterm2\n// after\nmise system where brew:iterm2   # or brew:homebrew/cask/iterm2 if supported by parse_spec","handlingStrategy":"validation","validationCode":"case \"$pkg\" in brew:*) mise system where \"$pkg\" ;; *) echo 'use brew:<formula>' ;; esac","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Always prefix specs with `brew:` for system where lookups","Remember only formulae are supported, not casks","Consult `mise system where --help` for the accepted spec format"],"tags":["cli","homebrew","lookup","invalid-argument"],"backgroundTag":"invalid-argument-value","analyzedSha":"533346cc374382b41ec5ff70536252b2e96e725c","analyzedAt":"2026-09-17T13:35:38.149Z","contentChangedAt":"2026-09-17T13:35:38.149Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}