{"record":{"id":"34954842c2da981b","repo":"jdx/mise","slug":"runtime-symlink-repair-s-failed","errorCode":null,"errorMessage":"{} runtime symlink repair(s) failed:\n{}","messagePattern":"(.+?) runtime symlink repair\\(s\\) failed:\n(.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src/runtime_symlinks.rs","lineNumber":49,"sourceCode":"        rebuild_symlinks_in_dir(config, ts, &backend, &installs_dir).wrap_err_with(|| {\n            format!(\n                \"failed to rebuild runtime symlinks for {} in {}\",\n                backend.ba().short,\n                installs_dir.display()\n            )\n        })\n    })\n}\n\nfn run_all_rebuilds<T>(\n    rebuilds: impl IntoIterator<Item = T>,\n    mut rebuild: impl FnMut(T) -> Result<()>,\n) -> Result<()> {\n    let errors = rebuilds\n        .into_iter()\n        .filter_map(|item| rebuild(item).err())\n        .collect_vec();\n    if errors.is_empty() {\n        return Ok(());\n    }\n    Err(eyre::eyre!(\n        \"{} runtime symlink repair(s) failed:\\n{}\",\n        errors.len(),\n        errors.iter().map(|err| format!(\"{err:#}\")).join(\"\\n\")\n    ))\n}\n\npub(crate) async fn migrate_real_dirs(config: &Config) -> Result<()> {\n    for backend in backend::list() {\n        for installs_dir in install_dirs_for(&backend) {\n            migrate_real_dirs_in_dir(config, &backend, &installs_dir)?;\n        }\n    }\n    Ok(())\n}\n","sourceCodeStart":31,"sourceCodeEnd":67,"githubUrl":"https://github.com/jdx/mise/blob/afd2eddd3a50c16190efc1c7e94404b48f72af57/src/runtime_symlinks.rs#L31-L67","documentation":"`runtime_symlinks::run_all_rebuilds` collects every individual rebuild error into a vector and, if any failed, returns a single aggregated error \"N runtime symlink repair(s) failed:\" followed by each error's full chain. It is an aggregation wrapper over per-item symlink repairs, not a root-cause error itself.","triggerScenarios":"Any command that triggers runtime symlink repair where one or more `rebuild(item)` calls return Err — typically broken/unwritable symlink targets or missing tool install paths.","commonSituations":"Core tools (node/python/go) whose install paths were moved or deleted; HOME or installs dir on a filesystem without symlink permission (some Windows configs); stale mise state after restores from backup.","solutions":["Read each line of the aggregated error to see which tools failed repair.","Reinstall the affected tool (`mise install <tool>`), then re-run the command or `mise reshim`.","Check symlink/privilege support on the installs directory (Windows Developer Mode, or avoid network filesystems).","Wipe stale state for the failing tool and reinstall from scratch."],"exampleFix":"// before\n# node runtime symlinks broken after manual delete\n// after\nmise install node && mise reshim","handlingStrategy":"validation","validationCode":"mise ls --json | jq '.[] | select(.installed == null)'  # find tools with missing install paths before commands that trigger repair","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Reinstall tools whose install dirs were moved or manually deleted.","Avoid symlink-hostile filesystems (network shares, Windows without Developer Mode).","Run `mise reshim` after external changes to installs directories.","Restore mise state and installs together from backups, never independently."],"tags":["rust","symlink","repair","aggregation"],"backgroundTag":"file-not-found","analyzedSha":"afd2eddd3a50c16190efc1c7e94404b48f72af57","analyzedAt":"2026-09-09T01:38:25.179Z","contentChangedAt":"2026-09-09T01:38:25.179Z","schemaVersion":2},"datasetVersion":"2026-09-14T00:17:10.932Z"}