jdx/mise · error · eyre::Report
runtime symlink repair(s) failed
Error message
{} runtime symlink repair(s) failed:
{} What it means
Aggregated error from run_all_rebuilds in src/runtime_symlinks.rs. After attempting to repair runtime tool symlinks for every item, any per-item rebuild() failures are collected and combined into one error listing the count and each failure's full chain (`{err:#}` includes causes). The individual failures are surfaced here, not at their original throw site.
Solutions
- Read the per-item failures in the message body to identify which symlink repairs failed, then fix the root cause of each (usually reinstalling the missing tool version).
- Run `mise install` to restore missing tool installs referenced by the config.
- Remove stale symlinks/installs directories and let mise rebuild them.
- Check filesystem permissions on the mise installs/data directory.
Example fix
// before: ignoring individual rebuild results
rebuild(item)?;
// after: surface which item failed
rebuild(item).map_err(|e| eyre!("rebuilding symlinks for {item}: {e:#}"))?; Defensive patterns
Strategy: try-catch
Validate before calling
// check installs referenced by the toolset exist before repairing symlinks
for v in ts.resolved_versions() {
let p = installs_dir.join(v.to_string());
if !p.exists() { eprintln!("missing install: {}", p.display()); }
} Try / catch
match run_all_rebuilds() {
Err(e) => {
eprintln!("runtime symlink repair failed:\n{e:#}");
// rerun `mise install` to restore missing targets
}
Ok(()) => {}
} Prevention
- Don't manually delete tool installs; use `mise uninstall`.
- Run `mise install` after editing tool versions in config files.
- Keep the mise data directory on a filesystem with consistent permissions.
When it happens
Trigger: Calling rebuild_for_backends (or tests like run_all_rebuilds_attempts_every_item) when one or more rebuild(item) calls return Err — e.g. symlink target install directories missing, permissions problems, or another process holding the path.
Common situations: Activation/shim resolution after a partial install was deleted, tool installs removed manually from ~/.local/share/mise while config still references them, or filesystem permission issues in the installs directory.
Understand the failure class
Background: "File not found" and ENOENT errors: why libraries can't find a file that should exist — this error's family across 50 libraries.
Related errors
- a parent directory is now a symlink; left untouched
- a validated copy_link has a staged parent
- binary target is not an owned Caskroom symlink
- binary target is not an owned Caskroom symlink
- brew-cask: binary artifact
AI-assisted analysis of jdx/mise@533346cc37 (2026-09-17).
Data as JSON: /api/errors/34954842c2da981b.
Report an issue: GitHub.
Appendix: source
Thrown at src/runtime_symlinks.rs:53
backend.ba().short,
installs_dir.display()
)
})
})
}
fn run_all_rebuilds<T>(
rebuilds: impl IntoIterator<Item = T>,
mut rebuild: impl FnMut(T) -> Result<()>,
) -> Result<()> {
let errors = rebuilds
.into_iter()
.filter_map(|item| rebuild(item).err())
.collect_vec();
if errors.is_empty() {
return Ok(());
}
Err(eyre::eyre!(
"{} runtime symlink repair(s) failed:\n{}",
errors.len(),
errors.iter().map(|err| format!("{err:#}")).join("\n")
))
}
pub(crate) async fn migrate_real_dirs(config: &Config) -> Result<()> {
for backend in backend::list() {
for installs_dir in install_dirs_for(&backend) {
migrate_real_dirs_in_dir(config, &backend, &installs_dir)?;
}
}
Ok(())
}
/// All install directories to consider for a backend: the backend's primary
/// installs_path plus any shared/system dirs that contain the tool. Per-dir
/// rebuilds are no-ops when desired state already matches actual state, soView on GitHub (pinned to 533346cc37)