{"record":{"id":"9bb3975126b21fa8","repo":"jdx/mise","slug":"files-cannot-diff-these-entries-fix-them-manuall","errorCode":null,"errorMessage":"files: cannot diff these entries, fix them manually:\n{}","messagePattern":"files: cannot diff these entries, fix them manually:\n(.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src/system/files.rs","lineNumber":3292,"sourceCode":"            },\n            _ => None,\n        };\n        match check_rendered(req, rendered.as_deref()) {\n            Ok(FileState::Applied) => continue,\n            Ok(_) => {}\n            Err(err) => {\n                problems.push(format!(\"  \\\"{}\\\": {err}\", req.target_raw));\n                continue;\n            }\n        }\n        changed = true;\n        miseprintln!(\"dotfile differs: {}\", req.target.display_user());\n        if let Err(err) = print_diff(config, req, rendered.as_deref()) {\n            problems.push(format!(\"  \\\"{}\\\": {err}\", req.target_raw));\n        }\n    }\n    if !problems.is_empty() {\n        bail!(\n            \"files: cannot diff these entries, fix them manually:\\n{}\",\n            problems.join(\"\\n\")\n        );\n    }\n    if !changed {\n        info!(\"files: all files are applied\");\n    }\n    Ok(())\n}\n\nconst DOTFILES_PART: &str = \"dotfiles\";\n\n/// Every path `apply_one` may create, replace, or remove for `req`, with how\n/// deeply to capture it first: a path that gets replaced is captured whole,\n/// a directory that stays a directory only by existence.\nfn touched_paths(req: &FileRequest) -> Result<Vec<(PathBuf, Capture)>> {\n    let mut paths: IndexMap<PathBuf, Capture> = IndexMap::new();\n    for dir in missing_ancestors(&req.target) {","sourceCodeStart":3274,"sourceCodeEnd":3310,"githubUrl":"https://github.com/jdx/mise/blob/533346cc374382b41ec5ff70536252b2e96e725c/src/system/files.rs#L3274-L3310","documentation":"During `mise files status`/diff rendering, when a dotfile differs from its managed source mise tries to print a unified diff. If generating that diff itself fails (e.g. the source is missing, unreadable, or the diff command errors), the entry is added to a `problems` list; if any problems accumulated, the whole command bails with this aggregated message telling the user to fix those entries manually.","triggerScenarios":"Running a files status/diff command where at least one entry's `print_diff` returned Err — typically because the source file is missing or unreadable while the target differs — and `problems` is non-empty.","commonSituations":"Partially deleted dotfiles repos, unreadable source files (permissions), or entries whose source/target pair is broken such that no diff can be produced.","solutions":["Fix each listed entry manually: restore or repair its source file so a diff can be produced","Re-apply (`mise files apply --force` as appropriate) or remove the broken entries from config","Check permissions on the listed source paths"],"exampleFix":"// before (mise.toml)\n[[files]]\nsource = \"~/dotfiles/missing.conf\"  # deleted from repo\ntarget = \"~/.config/app.conf\"\n\n// after — restore the source or drop the stale entry\n[[files]]\nsource = \"~/dotfiles/app.conf\"\ntarget = \"~/.config/app.conf\"","handlingStrategy":"try-catch","validationCode":"for (entry of entries) {\n  if (!fs.existsSync(entry.source)) warn(`cannot diff '${entry.target}': source missing`);\n}","typeGuard":null,"tryCatchPattern":"// handle the aggregated bail\nmatch cmd_output {\n  Err(e) if e.contains(\"cannot diff these entries\") =>\n    fix_listed_entries_manually(e),\n  Err(e) => return Err(e),\n}","preventionTips":["Fix differing files as soon as status reports them","Keep all sources readable and present","Repair broken entries rather than accumulating them"],"tags":["dotfiles","diff","aggregated-errors"],"backgroundTag":"file-read-failed","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"}