{"record":{"id":"1f77386e6909e16e","repo":"jdx/mise","slug":"dotfiles-manifest-requires-the-source-to-b","errorCode":null,"errorMessage":"[dotfiles].\"{}\": manifest requires the source to be a directory: {}","messagePattern":"\\[dotfiles\\]\\.\"(.+?)\": manifest requires the source to be a directory: (.+?)","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src/system/files.rs","lineNumber":520,"sourceCode":"}\n\n/// Validate the complete paths claimed by composed `[dotfiles]` entries.\n/// Directory copies and `symlink-each` entries may share directories, but no\n/// two entries may own the same leaf or require a directory where another\n/// entry places a leaf.\npub(crate) fn validate_composed_file_footprints(requests: &[FileRequest]) -> Result<()> {\n    let mut leaves: IndexMap<PathBuf, &FileRequest> = IndexMap::new();\n    let mut directories: IndexMap<PathBuf, &FileRequest> = IndexMap::new();\n    let mut symlink_each_identities: HashMap<(&Path, &Path), &FileRequest> = HashMap::new();\n\n    for request in requests {\n        // Tracking observes native files; it does not own an apply leaf.\n        // A tracked parent may contain independently managed destinations.\n        if request.mode == FileMode::Track {\n            continue;\n        }\n        if request.manifest.is_some() && request.source.exists() && !request.source.is_dir() {\n            bail!(\n                \"[dotfiles].\\\"{}\\\": manifest requires the source to be a directory: {}\",\n                request.target_raw,\n                request.source.display_user()\n            );\n        }\n        if request.mode == FileMode::SymlinkEach\n            && let Some(existing) = symlink_each_identities.insert(\n                (request.source.as_path(), request.target.as_path()),\n                request,\n            )\n        {\n            return Err(composed_file_footprint_conflict(\n                &request.target,\n                existing,\n                request,\n            ));\n        }\n        // A missing source has an unknown eventual shape, but it still claims","sourceCodeStart":502,"sourceCodeEnd":538,"githubUrl":"https://github.com/jdx/mise/blob/533346cc374382b41ec5ff70536252b2e96e725c/src/system/files.rs#L502-L538","documentation":"A dotfile entry that declares a `manifest` is treated as a directory-of-files manifest. During `validate_composed_file_footprints`, if the entry has a manifest, the source exists on disk, but the source is a regular file rather than a directory, validation fails because a manifest only makes sense over a directory tree.","triggerScenarios":"Setting `manifest = true` (or an equivalent manifest key) on an entry whose `source` points at a single file that exists, in any non-Track mode.","commonSituations":"Pointing the source at `dotfiles/gitconfig` (a file) instead of a directory containing a manifest; renaming directories so the source now resolves to a leftover file.","solutions":["Point `source` at a directory that contains the manifest and its files","Remove the `manifest` key if the source really is a single file","Create the expected directory structure and move the file inside it"],"exampleFix":"// before\n\"~/.config/app\" = { source = \"dotfiles/app.conf\", manifest = true }\n// after\n\"~/.config/app\" = { source = \"dotfiles/app\", manifest = true }  # dotfiles/app/ is a directory","handlingStrategy":"validation","validationCode":"const fs = require('fs');\nfunction manifestSourceOk(entry) {\n  if (!entry || !entry.manifest || !entry.source) return true;\n  return !fs.existsSync(entry.source) || fs.statSync(entry.source).isDirectory();\n}","typeGuard":"const isDir = (p: string) => { try { return require('fs').statSync(p).isDirectory(); } catch { return false; } };","tryCatchPattern":null,"preventionTips":["Point `manifest` entries at directories, not files","Verify the source path exists as a directory after renames/refactors"],"tags":["config","dotfiles","path-is-not-directory"],"backgroundTag":"path-is-not-a-directory","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"}