{"record":{"id":"02257c196ee55a6e","repo":"vectordotdev/vector","slug":"description-must-not-be-the-repository-root","errorCode":null,"errorMessage":"{description} must not be the repository root: {}","messagePattern":"(.+?) must not be the repository root: (.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"vdev/src/utils/paths.rs","lineNumber":66,"sourceCode":"    path: &Path,\n    description: &str,\n) -> Result<PathBuf> {\n    let mut relative = PathBuf::new();\n    for component in path.components() {\n        match component {\n            Component::Normal(component) => relative.push(component),\n            Component::CurDir => {}\n            Component::ParentDir | Component::RootDir | Component::Prefix(_) => {\n                bail!(\n                    \"{description} must be a relative descendant of the repository: {}\",\n                    path.display()\n                );\n            }\n        }\n    }\n\n    if relative.as_os_str().is_empty() {\n        bail!(\n            \"{description} must not be the repository root: {}\",\n            path.display()\n        );\n    }\n\n    let output = repo_root.join(relative);\n    let canonical_root = repo_root.canonicalize().with_context(|| {\n        format!(\n            \"Could not canonicalize repository root {}\",\n            repo_root.display()\n        )\n    })?;\n    let existing_ancestor = output\n        .ancestors()\n        .find(|ancestor| ancestor.exists())\n        .expect(\"repository root must be an existing output ancestor\");\n    let canonical_ancestor = existing_ancestor.canonicalize().with_context(|| {\n        format!(","sourceCodeStart":48,"sourceCodeEnd":84,"githubUrl":"https://github.com/vectordotdev/vector/blob/0d4ab78a4f0d9c9e5d03a50108a2ae4d2f4b2460/vdev/src/utils/paths.rs#L48-L84","documentation":"Raised by resolve_repo_relative_path after component filtering: the input path consisted solely of CurDir components (e.g. '.' or './'), so the accumulated relative path is empty, meaning the user asked to operate on the repository root itself. The operation described by {description} requires an actual subdirectory/file below the root, so the guard bails.","triggerScenarios":"Thrown at vdev/src/utils/paths.rs:65 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Point at a concrete file or subdirectory inside the repository instead of '.'","Check for a shell glob that expanded to the current directory"],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"0d4ab78a4f0d9c9e5d03a50108a2ae4d2f4b2460","analyzedAt":"2026-09-16T02:53:35.741Z","contentChangedAt":"2026-09-16T02:53:35.741Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}