{"record":{"id":"e69b162a137f926a","repo":"jdx/mise","slug":"brew-cask-unsupported-tap-url-for-name-only","errorCode":null,"errorMessage":"brew-cask: unsupported tap URL for '{name}'; only GitHub tap URLs can be fetched directly","messagePattern":"brew-cask: unsupported tap URL for '(.+?)'; only GitHub tap URLs can be fetched directly","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src/system/packages/brew/cask.rs","lineNumber":848,"sourceCode":"    }\n}\n\nasync fn fetch_cask(req: &PackageRequest) -> Result<Cask> {\n    let name = &req.name;\n    let (requested_token, official_api) = match split_tap_name(name) {\n        Some((\"homebrew\", \"cask\", token)) => (token, true),\n        Some((_, _, token)) => (token, false),\n        None => (name.as_str(), true),\n    };\n    validate_cask_path_component(\"requested token\", requested_token)?;\n    let (url, raw_base) = match split_tap_name(name) {\n        Some((\"homebrew\", \"cask\", token)) => (\n            format!(\"{API_BASE}/cask/{token}.json\"),\n            Some(HOMEBREW_CASK_RAW.to_string()),\n        ),\n        Some((owner, tap, token)) => {\n            let Some(base) = super::api::tap_raw_base(owner, tap, req.tap_url.as_deref()) else {\n                bail!(\n                    \"brew-cask: unsupported tap URL for '{name}'; only GitHub tap URLs can be fetched directly\"\n                );\n            };\n            (\n                format!(\"{base}/api/cask/{token}.json\"),\n                Some(base.trim_end_matches(\"/HEAD\").to_string()),\n            )\n        }\n        None => (\n            format!(\"{API_BASE}/cask/{name}.json\"),\n            Some(HOMEBREW_CASK_RAW.to_string()),\n        ),\n    };\n    let mut cask = HTTP_FETCH\n        .json_cached::<Cask, _>(url)\n        .await\n        .wrap_err_with(|| {\n            format!(","sourceCodeStart":830,"sourceCodeEnd":866,"githubUrl":"https://github.com/jdx/mise/blob/9dcfcaa0dc8747a2577d3270b69bb9d8313b2807/src/system/packages/brew/cask.rs#L830-L866","documentation":"The cask twin of the formula tap error: to fetch a third-party cask's JSON without the brew CLI, mise derives a raw.githubusercontent.com base from the tap (tap_raw_base). When a tap URL is configured but isn't a plain https://github.com/<owner>/<repo> URL, no base can be derived and mise refuses rather than guessing.","triggerScenarios":"Requesting `brew-cask:owner/tap/token` while the configured tap URL (in [bootstrap.brew.taps]) is non-GitHub (GitLab, self-hosted), an SSH URL, or contains extra path components such as /tree/main.","commonSituations":"Internal GitLab mirrors of taps; copy-pasted clone URLs; taps hosted outside GitHub entirely.","solutions":["Point the tap at its bare GitHub repo URL: https://github.com/<owner>/<repo>","Drop the URL override — the owner/homebrew-<tap> convention is inferred automatically","For non-GitHub taps, install the cask with the brew CLI outside mise"],"exampleFix":"# before\n[bootstrap.brew.taps]\n\"myorg/casks\" = \"git@github.com:myorg/homebrew-casks.git\"\n\n# after\n[bootstrap.brew.taps]\n\"myorg/casks\" = \"https://github.com/myorg/homebrew-casks\"","handlingStrategy":"validation","validationCode":"fn is_bare_github_url(url: &str) -> bool {\n    let u = url.trim_end_matches(\".git\").trim_end_matches('/');\n    match u.strip_prefix(\"https://github.com/\") {\n        Some(rest) => rest.split('/').count() == 2,\n        None => false,\n    }\n}\n// validate req.tap_url before fetching a tapped cask","typeGuard":null,"tryCatchPattern":"Catch the 'unsupported tap URL' bail and report the configured tap entry: only bare GitHub https URLs are supported for direct cask metadata fetching.","preventionTips":["Keep [bootstrap.brew.taps] entries as bare GitHub repo URLs","Test third-party taps with a single mise install before wiring them into bootstrap"],"tags":["homebrew","cask","tap","github","mise","config"],"backgroundTag":"unsupported-package-source-url","analyzedSha":"9dcfcaa0dc8747a2577d3270b69bb9d8313b2807","analyzedAt":"2026-08-17T14:28:50.624Z","schemaVersion":2},"datasetVersion":"2026-08-21T18:17:14.833Z"}