{"record":{"id":"146030ee5c405412","repo":"jdx/mise","slug":"github-content-package-requires-path","errorCode":null,"errorMessage":"github_content package requires `path`","messagePattern":"github_content package requires `path`","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src/backend/aqua.rs","lineNumber":859,"sourceCode":"                        }\n                    }\n                }\n                result\n            }\n            AquaPackageType::GithubArchive => (\n                Some(self.github_archive_url(&pkg, &v)),\n                Some(self.github_archive_api_url(&pkg, &v)),\n                None,\n            ),\n            AquaPackageType::GithubContent => {\n                if pkg.path.is_some() {\n                    (\n                        Some(self.github_content_url(&pkg, &v)),\n                        Some(self.github_content_api_url(&pkg, &v)),\n                        None,\n                    )\n                } else {\n                    bail!(\"github_content package requires `path`\")\n                }\n            }\n            AquaPackageType::Http => {\n                let (url, resolved_version) =\n                    resolve_aqua_http_url(&pkg, &v, v_prefixed.as_deref(), target_os, target_arch)\n                        .await?;\n                v = resolved_version;\n                (Some(url), None, None)\n            }\n            _ => (None, None, None),\n        };\n\n        let name = url.as_ref().map(|u| get_filename_from_url(u));\n        if let Some(filename) = &name {\n            pkg = Self::apply_selected_asset_libc_replacement(pkg, target_os, filename);\n        }\n\n        // Try to get checksum from checksum file if not available from GitHub API","sourceCodeStart":841,"sourceCodeEnd":877,"githubUrl":"https://github.com/jdx/mise/blob/afd2eddd3a50c16190efc1c7e94404b48f72af57/src/backend/aqua.rs#L841-L877","documentation":"Aqua packages of type github_content serve files directly from a GitHub repository, so the package definition must specify which `path` within the repo to fetch. resolve_lock_info bails when such a package lacks `path`, since no URL can be constructed without it.","triggerScenarios":"Resolving lock info for an aqua package with package_type github_content whose TOML defines repo_owner/repo_name but omits the `path` field.","commonSituations":"Hand-written or copied aqua package entry missing the `path` key; upstream aqua-registry entry changed/removed `path`; typo like `paths` instead of `path`.","solutions":["Add the required `path` field to the package TOML (e.g. path = \"install.sh\" or the binary's path in the repo).","Fix the typo if a misspelled key was used, and validate the TOML against the aqua package schema.","Pin a working version of the aqua-registry package or fix the entry upstream if it comes from aqua-registry."],"exampleFix":"// before\npackages = [\"github_content/example/3.2.1\"]  # package TOML lacks `path`\n// after (aqua package TOML)\n[package]\ntype = \"github_content\"\nrepo_owner = \"example\"\nrepo_name = \"example\"\npath = \"bin/example.sh\"  # required for github_content packages","handlingStrategy":"validation","validationCode":"fn github_content_ok(pkg: &toml::Value) -> bool {\n    pkg.get(\"type\").and_then(|t| t.as_str()) != Some(\"github_content\")\n        || pkg.get(\"path\").and_then(|p| p.as_str()).map(|s| !s.is_empty()).unwrap_or(false)\n}","typeGuard":null,"tryCatchPattern":"match resolve_lock_info(pkg) {\n    Ok(info) => use(info),\n    Err(e) if e.to_string().contains(\"github_content package requires `path`\") => {\n        eprintln!(\"add `path` to the github_content package definition\");\n    }\n    Err(e) => return Err(e),\n}","preventionTips":["Always set `path` when defining github_content aqua packages.","Validate package TOML against the aqua schema before committing.","Watch upstream aqua-registry diffs for removed `path` fields."],"tags":["aqua","config","missing-field"],"backgroundTag":"missing-required-config-field","analyzedSha":"afd2eddd3a50c16190efc1c7e94404b48f72af57","analyzedAt":"2026-09-09T01:38:25.179Z","contentChangedAt":"2026-09-09T01:38:25.179Z","schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}