{"record":{"id":"63b05282361196ac","repo":"Morganamilo/paru","slug":"repo-does-not-have-a-url-or-path","errorCode":null,"errorMessage":"repo {} does not have a URL or Path","messagePattern":"repo (.+?) does not have a URL or Path","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src/pkgbuild.rs","lineNumber":91,"sourceCode":"        PkgbuildRepo {\n            depth: 2,\n            path,\n            name,\n            source: RepoSource::None,\n            skip_review: false,\n            force_srcinfo: false,\n            pkgs: OnceCell::new(),\n        }\n    }\n\n    pub fn path(&self) -> Result<PathBuf> {\n        match &self.source {\n            RepoSource::Url(_, Some(path)) => {\n                Ok(self.path.join(path.strip_prefix(\"/\").unwrap_or(path)))\n            }\n            RepoSource::Url(_, None) => Ok(self.path.clone()),\n            RepoSource::Path(path) => Ok(path.clone()),\n            RepoSource::None => bail!(tr!(\"repo {} does not have a URL or Path\")),\n        }\n    }\n\n    pub fn pkgs(&self, config: &Config) -> &[PkgbuildPkg] {\n        self.pkgs\n            .get_or_init(move || Arc::new(self.read_pkgs(config)))\n    }\n\n    pub fn base(&self, config: &Config, base: &str) -> Option<&PkgbuildPkg> {\n        self.pkgs(config)\n            .iter()\n            .find(|p| p.srcinfo.base.pkgbase == base)\n    }\n\n    pub fn pkg(&self, config: &Config, pkg: &str) -> Option<(&PkgbuildPkg, &srcinfo::Package)> {\n        self.pkgs(config)\n            .iter()\n            .find_map(|srcinfo| srcinfo.srcinfo.pkg(pkg).map(|p| (srcinfo, p)))","sourceCodeStart":73,"sourceCodeEnd":109,"githubUrl":"https://github.com/Morganamilo/paru/blob/9ac3578807a87858651e81a02586ceb947686e7c/src/pkgbuild.rs#L73-L109","documentation":"Repo::path resolves the local checkout path of a repo-backed pkgbuild. It handles Url-with-path, Url-without-path, and Path variants, but if the RepoSource is None — the repo was configured with neither a URL nor a local Path — there is no way to derive a filesystem location, so it bails naming the repo.","triggerScenarios":"Calling Repo::path (public) on a repo whose `source` is RepoSource::None: a repo registered in paru.conf (or via the pkgbuild repos feature) without either a Url = or Path = key.","commonSituations":"Hand-editing paru.conf and adding a repo section with only a name; typo'd keys (e.g. `url =` lowercase in a case-sensitive parser or `Repo =` misformat); repos created programmatically without setting source; config migration dropping the URL field.","solutions":["Open paru.conf and add a `Url = <git-url>` (or `Path = /local/dir`) line to the named repo section","Check for typos in the key names (Url/Path must match the expected capitalization)","Remove the half-configured repo section if it's not needed","Re-add the repo via the documented paru.conf syntax and retry"],"exampleFix":"// paru.conf before\n[myrepo]\nSigLevel = Optional\n// after\n[myrepo]\nUrl = https://github.com/user/myrepo.git","handlingStrategy":"validation","validationCode":"// validate repo config before use\nfor repo in repos {\n    if repo.url.is_none() && repo.path.is_none() {\n        bail!(\"repo {} needs a Url or Path in paru.conf\", repo.name);\n    }\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Every [repo] section in paru.conf must define Url or Path","Validate paru.conf after manual edits","Keep exact key capitalization (Url/Path)"],"tags":["config","repo","pkgbuild","missing-config"],"backgroundTag":"missing-required-config-field","analyzedSha":"9ac3578807a87858651e81a02586ceb947686e7c","analyzedAt":"2026-09-12T04:57:59.861Z","contentChangedAt":"2026-09-12T04:57:59.861Z","schemaVersion":2},"datasetVersion":"2026-09-16T09:17:16.951Z"}