{"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":868,"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":850,"sourceCodeEnd":886,"githubUrl":"https://github.com/jdx/mise/blob/533346cc374382b41ec5ff70536252b2e96e725c/src/backend/aqua.rs#L850-L886","documentation":"Aqua packages of type github_content fetch a single file from a GitHub repository at a path. If such a package lacks the required `path` field in its config, the backend cannot construct the download URL and throws this error during lock-info resolution.","triggerScenarios":"Defining (or overriding) an aqua package with type github_content but omitting `path` (and only repo/repo_owner/repo_name given), while resolve_lock_info builds the URL/API URLs for a version.","commonSituations":"Copy-pasting a github_archive or github_release package config and switching only the type; hand-writing a custom registry entry for a single-file tool and forgetting `path`; upstream aqua-registry package missing the field after a schema change.","solutions":["Add the `path` field to the github_content package config, pointing at the file inside the repo (e.g. path: install.sh)","If you meant to fetch a whole release/archive, change the package type to github_release or github_archive instead of github_content","If this comes from an upstream registry package, pin to a registry version where the package defines `path` or report the registry entry"],"exampleFix":"# before\npackages:\n  - type: github_content\n    repo_owner: someowner\n    repo_name: sometool\n# after\npackages:\n  - type: github_content\n    repo_owner: someowner\n    repo_name: sometool\n    path: sometool\n","handlingStrategy":"validation","validationCode":"if pkg.package_type() == AquaPackageType::GithubContent && pkg.path.is_none() {\n    return Err(anyhow!(\"github_content package requires `path`\"));\n}","typeGuard":"fn github_content_has_path(pkg: &AquaPackage) -> bool {\n    pkg.package_type() != AquaPackageType::GithubContent || pkg.path.is_some()\n}","tryCatchPattern":"match resolve_lock_info(pkg, v).await {\n    Err(e) if e.to_string().contains(\"github_content package requires `path`\") => {\n        eprintln!(\"fix the registry entry: add `path` to the github_content package\");\n    }\n    r => r?,\n}","preventionTips":["When defining github_content packages, always set `path` (repo-relative file path)","Don't switch package types without reviewing the required fields for each type","Validate custom registry entries against the aqua package schema before use"],"tags":["aqua","config","github-content"],"backgroundTag":"missing-required-config-field","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"}