{"record":{"id":"6ceea377c8f807e7","repo":"jdx/mise","slug":"tap-tap-must-be-in-owner-repo-format-supp","errorCode":null,"errorMessage":"tap '{tap}' must be in <owner>/<repo> format; supply an explicit URL for non-standard taps","messagePattern":"tap '(.+?)' must be in <owner>/<repo> format; supply an explicit URL for non-standard taps","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src/system/packages/brew/maintenance.rs","lineNumber":91,"sourceCode":"    #[serde(default)]\n    installed_on_request: Option<bool>,\n    #[serde(default)]\n    source: Option<ReceiptSource>,\n}\n\n#[derive(Debug, Default, Deserialize)]\nstruct ReceiptSource {\n    #[serde(default)]\n    tap: Option<String>,\n}\n\npub(crate) fn default_tap_url(tap: &str) -> Result<String> {\n    let mut parts = tap.split('/');\n    match (parts.next(), parts.next(), parts.next()) {\n        (Some(owner), Some(repo), None) if !owner.is_empty() && !repo.is_empty() => {\n            Ok(format!(\"https://github.com/{owner}/homebrew-{repo}.git\"))\n        }\n        _ => bail!(\n            \"tap '{tap}' must be in <owner>/<repo> format; supply an explicit URL for non-standard taps\"\n        ),\n    }\n}\n\npub(crate) fn linked_formulae(include_all: bool) -> Result<Vec<InstalledFormula>> {\n    let opt = prefix::prefix().join(\"opt\");\n    let mut formulae = BTreeMap::new();\n    for entry in file::ls(&opt)? {\n        if !entry\n            .symlink_metadata()\n            .is_ok_and(|m| m.file_type().is_symlink())\n        {\n            continue;\n        }\n        let Some(name) = entry\n            .file_name()\n            .and_then(|f| f.to_str())","sourceCodeStart":73,"sourceCodeEnd":109,"githubUrl":"https://github.com/jdx/mise/blob/533346cc374382b41ec5ff70536252b2e96e725c/src/system/packages/brew/maintenance.rs#L73-L109","documentation":"default_tap_url requires a tap name in <owner>/<repo> format to build the default GitHub URL (https://github.com/<owner>/homebrew-<repo>.git). Any other shape — missing slash, empty components, extra slashes, or a bare name — is rejected because a URL cannot be derived unambiguously without an explicit URL.","triggerScenarios":"Called from run and tap_entry_with_urls when configuring a tap; triggered by taps like \"homebrew\", \"owner/repo/extra\", \"/repo\", \"owner/\", or names containing whitespace. Also when a user supplies a nonstandard tap without its git URL.","commonSituations":"Config mistakes in brew backend entries where a tap is written without the owner; typos like double slashes; attempting to use Homebrew's official shorthand (e.g. \"homebrew/cask\") without a URL.","solutions":["Write the tap as <owner>/<repo>, e.g. owner/tap.","Supply an explicit git URL for non-standard taps instead of relying on the default.","Check the config for typos: exactly one slash, no empty or whitespace components.","Consult `brew tap` output locally to get the correct owner/repo pair."],"exampleFix":"// before\nlet url = default_tap_url(\"homebrew\").unwrap();          // panics/errors\nlet url2 = default_tap_url(\"owner/repo/extra\").unwrap(); // too many parts\n// after\nlet url = default_tap_url(\"owner/repo\").unwrap();        // https://github.com/owner/homebrew-repo.git\n// or supply an explicit URL for nonstandard taps","handlingStrategy":"validation","validationCode":"fn is_valid_tap(tap: &str) -> bool {\n    let parts: Vec<&str> = tap.split('/').collect();\n    parts.len() == 2 && parts.iter().all(|p| !p.is_empty() && !p.trim().is_empty())\n}","typeGuard":"fn parse_tap(tap: &str) -> Option<(&str, &str)> {\n    let (owner, repo) = tap.split_once('/')?;\n    if owner.is_empty() || repo.is_empty() || repo.contains('/') { return None; }\n    Some((owner, repo))\n}","tryCatchPattern":null,"preventionTips":["Always write taps as owner/repo in config files.","Provide an explicit URL for any nonstandard tap layout.","Lint config files for stray whitespace or extra slashes in tap names.","Copy exact owner/repo from `brew tap` output."],"tags":["config","brew","url-format"],"backgroundTag":"invalid-argument-format","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"}