jdx/mise · error

files: cannot diff these entries, fix them manually

Error message

files: cannot diff these entries, fix them manually:
{}

What it means

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.

Solutions

  1. Fix each listed entry manually: restore or repair its source file so a diff can be produced
  2. Re-apply (`mise files apply --force` as appropriate) or remove the broken entries from config
  3. Check permissions on the listed source paths

Example fix

// before (mise.toml)
[[files]]
source = "~/dotfiles/missing.conf"  # deleted from repo
target = "~/.config/app.conf"

// after — restore the source or drop the stale entry
[[files]]
source = "~/dotfiles/app.conf"
target = "~/.config/app.conf"
Defensive patterns

Strategy: try-catch

Validate before calling

for (entry of entries) {
  if (!fs.existsSync(entry.source)) warn(`cannot diff '${entry.target}': source missing`);
}

Try / catch

// handle the aggregated bail
match cmd_output {
  Err(e) if e.contains("cannot diff these entries") =>
    fix_listed_entries_manually(e),
  Err(e) => return Err(e),
}

Prevention

When it happens

Trigger: 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.

Common situations: Partially deleted dotfiles repos, unreadable source files (permissions), or entries whose source/target pair is broken such that no diff can be produced.

Understand the failure class

Background: "failed to read file", EACCES, ENOENT and "could not read <path>" errors: when a program can't read a file from disk — this error's family across 49 libraries.

Related errors


AI-assisted analysis of jdx/mise@533346cc37 (2026-09-17). Data as JSON: /api/errors/9bb3975126b21fa8. Report an issue: GitHub.

Appendix: source

Thrown at src/system/files.rs:3292

            },
            _ => None,
        };
        match check_rendered(req, rendered.as_deref()) {
            Ok(FileState::Applied) => continue,
            Ok(_) => {}
            Err(err) => {
                problems.push(format!("  \"{}\": {err}", req.target_raw));
                continue;
            }
        }
        changed = true;
        miseprintln!("dotfile differs: {}", req.target.display_user());
        if let Err(err) = print_diff(config, req, rendered.as_deref()) {
            problems.push(format!("  \"{}\": {err}", req.target_raw));
        }
    }
    if !problems.is_empty() {
        bail!(
            "files: cannot diff these entries, fix them manually:\n{}",
            problems.join("\n")
        );
    }
    if !changed {
        info!("files: all files are applied");
    }
    Ok(())
}

const DOTFILES_PART: &str = "dotfiles";

/// Every path `apply_one` may create, replace, or remove for `req`, with how
/// deeply to capture it first: a path that gets replaced is captured whole,
/// a directory that stays a directory only by existence.
fn touched_paths(req: &FileRequest) -> Result<Vec<(PathBuf, Capture)>> {
    let mut paths: IndexMap<PathBuf, Capture> = IndexMap::new();
    for dir in missing_ancestors(&req.target) {

View on GitHub (pinned to 533346cc37)