{"record":{"id":"efcbe8d4da5f1f67","repo":"jdx/mise","slug":"brew-name-package-lookup-supports-macos-arm64-and-linux-x86","errorCode":null,"errorMessage":"brew:{name}: package lookup supports macOS arm64 and Linux x86_64/arm64","messagePattern":"brew:(.+?): package lookup supports macOS arm64 and Linux x86_64/arm64","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src/cli/system/where.rs","lineNumber":36,"sourceCode":"    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}\n\n#[cfg(any(unix, test))]\n/// Borrow a lossless, single-line UTF-8 path suitable for shell command substitution.\nfn path_for_output(path: &Path) -> Result<&str> {\n    match path.to_str() {\n        Some(value) if !value.contains(['\\r', '\\n']) => Ok(value),\n        _ => bail!(\n            \"the prefix cannot be printed as a single UTF-8 path; use a compatible prefix path\"\n        ),","sourceCodeStart":18,"sourceCodeEnd":54,"githubUrl":"https://github.com/jdx/mise/blob/533346cc374382b41ec5ff70536252b2e96e725c/src/cli/system/where.rs#L18-L54","documentation":"`mise system where brew:<name>` requires a working Homebrew installation on a supported platform (macOS arm64, Linux x86_64/arm64). When `BrewManager::new().is_available()` reports false — Homebrew missing or unsupported host — run() bails with this capability message instead of attempting the lookup.","triggerScenarios":"Running `mise system where brew:<formula>` where brew is absent from PATH, the Homebrew prefix cannot be found, or the platform is not one of macOS arm64 / Linux x86_64 / Linux arm64 (e.g. Linux on another architecture, or non-unix).","commonSituations":"Linux CI on non-x86_64/arm64 archs; containers without Homebrew; users expecting mise to resolve brew paths on machines where brew was never installed.","solutions":["Install Homebrew (Linuxbrew on Linux) and ensure `brew` is on PATH, then retry","Confirm the platform is macOS arm64 or Linux x86_64/arm64; on other architectures brew lookup is not supported","Resolve the path manually with `brew --prefix <formula>` if reinstalling brew is not an option"],"exampleFix":"// before (no brew on machine)\nmise system where brew:ripgrep\n// after\nbrew --version || install-homebrew\nmise system where brew:ripgrep","handlingStrategy":"fallback","validationCode":"command -v brew >/dev/null 2>&1 && [[ \"$(uname -m)\" == arm64 || \"$(uname -m)\" == x86_64 ]] && mise system where \"brew:$name\"","typeGuard":null,"tryCatchPattern":"mise system where \"brew:$name\" 2>/dev/null || brew --prefix \"$name\"","preventionTips":["Verify brew is installed before brew-dependent mise commands","Check host architecture (macOS arm64, Linux x86_64/arm64 only)","Install Linuxbrew on Linux hosts that need brew lookups"],"tags":["homebrew","where","platform-support","dependency-missing"],"backgroundTag":"unsupported-platform","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"}