{"record":{"id":"804497592c996899","repo":"jdx/mise","slug":"files","errorCode":null,"errorMessage":"files: {}","messagePattern":"files: (.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src/system/files.rs","lineNumber":2497,"sourceCode":"            missing_sources.join(\"\\n\")\n        ));\n    }\n    if !broken.is_empty() {\n        problems.push(format!(\"entries with errors:\\n{}\", broken.join(\"\\n\")));\n    }\n    if !conflicts.is_empty() && !opts.force {\n        problems.push(format!(\n            \"refusing to overwrite existing files ({}):\\n{}\",\n            opts.force_hint,\n            conflicts\n                .iter()\n                .map(|p| format!(\"  {}\", p.display_user()))\n                .collect::<Vec<_>>()\n                .join(\"\\n\")\n        ));\n    }\n    if !problems.is_empty() {\n        bail!(\"files: {}\", problems.join(\"\\nfiles: \"));\n    }\n    Ok(ApplyPlan {\n        todo,\n        record_symlink_each,\n        reconciliation: plan_symlink_each_reconciliation(active_requests, requests)?,\n    })\n}\n\nfn cleanup_reconciled_directories(reconciliation: &SymlinkEachReconciliation) -> Result<()> {\n    for target in &reconciliation.targets {\n        for start in reconciliation\n            .stale_links\n            .iter()\n            .filter(|link| link.target.starts_with(target))\n            .filter_map(|link| link.target.parent())\n            .sorted_by_key(|path| std::cmp::Reverse(path.components().count()))\n            .unique()\n        {","sourceCodeStart":2479,"sourceCodeEnd":2515,"githubUrl":"https://github.com/jdx/mise/blob/533346cc374382b41ec5ff70536252b2e96e725c/src/system/files.rs#L2479-L2515","documentation":"This is the aggregate pre-flight error of the dotfiles apply planner. Instead of failing on the first bad entry, the planner collects three problem classes — missing sources, entries whose rendered content/state checks failed, and existing target files that would be overwritten — and reports them all at once under a `files:` prefix so one bad entry cannot hide the rest.","triggerScenarios":"`mise dot apply` when any `[dotfiles]` entry has a non-existent source path, a template that fails to render or a state check failure, or an existing unmanaged target file while `--force` was not passed (mode depends: symlink/copy/template conflicts).","commonSituations":"A dotfile source was renamed or deleted; a template contains a bad `exec()` or secret reference; the target file already exists from a previous manual setup; dry-running with an unrenderable template.","solutions":["Read each `files:` sub-section in the message: 'sources do not exist', 'entries with errors', and 'refusing to overwrite existing files' pinpoint the offending `[dotfiles].\"<target>\"` entries.","Fix or remove entries with missing sources in the mise config (`[dotfiles]` section).","Fix template errors (bad syntax, missing secrets referenced by the template).","Back up and remove the conflicting existing files, or re-run with `--force` once you are sure overwriting them is intended."],"exampleFix":"// before: target ~/.zshrc exists but is not managed, apply fails\nmise dot apply\n// files: refusing to overwrite existing files...\n// after\nmise dot apply --force   # or manually mv ~/.zshrc ~/.zshrc.bak first","handlingStrategy":"validation","validationCode":"mise dot apply --dry-run  # or run apply with dry-run first; it lists all problems in one pass","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Always dry-run (`mise dot apply` dry-run mode) after editing `[dotfiles]` config.","Back up existing dotfiles before first-time apply, or use `--force` deliberately.","Keep template secrets and dependencies available before applying.","Verify every `source` path exists after moving or renaming repos."],"tags":["dotfiles","validation","config"],"backgroundTag":"invalid-config-value","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"}