jdx/mise · error

command wrapper names collide on macOS after case…

Error message

command wrapper names collide on macOS after case normalization: {name:?}

What it means

validate_wrapper_names case-folds wrapper names on macOS (default case-insensitive filesystem): two wrappers differ only by letter case, so their shims would collide on disk after normalization, and the later one would overwrite the earlier. Configuration is rejected listing the colliding name.

Solutions

  1. Rename one of the case-variant wrappers (e.g. `Foo` vs `foo`) to a distinct spelling
  2. Remove the duplicate wrapper
  3. Pick names that are unique case-insensitively for cross-platform configs
Defensive patterns

Strategy: validation

When it happens

Trigger: Thrown at src/shims.rs:1160 when the library encounters an invalid state.

Common situations: See trigger scenarios.


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

Appendix: source

Thrown at src/shims.rs:1160

    }
}

fn validate_wrapper_name(name: &str) -> Result<()> {
    if name.is_empty() || name == "." || name == ".." || name.contains('/') || name.contains('\\') {
        bail!("invalid command wrapper name: {name:?}");
    }
    if cfg!(windows) && name.contains('.') {
        bail!("command wrapper names cannot contain dots on Windows: {name:?}");
    }
    Ok(())
}

fn validate_wrapper_names<'a>(names: impl IntoIterator<Item = &'a String>) -> Result<()> {
    let mut normalized = HashSet::new();
    for name in names {
        validate_wrapper_name(name)?;
        if cfg!(macos) && !normalized.insert(name.to_lowercase()) {
            bail!("command wrapper names collide on macOS after case normalization: {name:?}");
        }
    }
    Ok(())
}

/// Resolve the mise executable that Unix symlink shims should target.
///
/// Snap exposes applications through `/snap/bin`, where each command is a symlink to the
/// `snap` dispatcher. That dispatcher identifies the application from argv[0], so invoking it
/// through a mise shim named `node`, `python`, etc. runs the snap CLI instead of mise. Point Snap
/// shims at the payload beneath its refresh-stable `current` symlink instead. For other package
/// managers, retain the PATH-visible executable so their stable launcher survives upgrades.
pub(crate) fn mise_bin_for_shims() -> PathBuf {
    env::var_path("SNAP")
        .as_deref()
        .and_then(|snap| snap_mise_bin(&env::MISE_BIN, snap))
        .unwrap_or_else(|| file::which_no_shims("mise").unwrap_or(env::MISE_BIN.clone()))
}

View on GitHub (pinned to 533346cc37)