{"record":{"id":"d191f5564c7d8ad3","repo":"jdx/mise","slug":"command-wrapper-names-collide-on-macos-after-case","errorCode":null,"errorMessage":"command wrapper names collide on macOS after case normalization: {name:?}","messagePattern":"command wrapper names collide on macOS after case normalization: (.+?)","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src/shims.rs","lineNumber":1160,"sourceCode":"    }\n}\n\nfn validate_wrapper_name(name: &str) -> Result<()> {\n    if name.is_empty() || name == \".\" || name == \"..\" || name.contains('/') || name.contains('\\\\') {\n        bail!(\"invalid command wrapper name: {name:?}\");\n    }\n    if cfg!(windows) && name.contains('.') {\n        bail!(\"command wrapper names cannot contain dots on Windows: {name:?}\");\n    }\n    Ok(())\n}\n\nfn validate_wrapper_names<'a>(names: impl IntoIterator<Item = &'a String>) -> Result<()> {\n    let mut normalized = HashSet::new();\n    for name in names {\n        validate_wrapper_name(name)?;\n        if cfg!(macos) && !normalized.insert(name.to_lowercase()) {\n            bail!(\"command wrapper names collide on macOS after case normalization: {name:?}\");\n        }\n    }\n    Ok(())\n}\n\n/// Resolve the mise executable that Unix symlink shims should target.\n///\n/// Snap exposes applications through `/snap/bin`, where each command is a symlink to the\n/// `snap` dispatcher. That dispatcher identifies the application from argv[0], so invoking it\n/// through a mise shim named `node`, `python`, etc. runs the snap CLI instead of mise. Point Snap\n/// shims at the payload beneath its refresh-stable `current` symlink instead. For other package\n/// managers, retain the PATH-visible executable so their stable launcher survives upgrades.\npub(crate) fn mise_bin_for_shims() -> PathBuf {\n    env::var_path(\"SNAP\")\n        .as_deref()\n        .and_then(|snap| snap_mise_bin(&env::MISE_BIN, snap))\n        .unwrap_or_else(|| file::which_no_shims(\"mise\").unwrap_or(env::MISE_BIN.clone()))\n}","sourceCodeStart":1142,"sourceCodeEnd":1178,"githubUrl":"https://github.com/jdx/mise/blob/533346cc374382b41ec5ff70536252b2e96e725c/src/shims.rs#L1142-L1178","documentation":"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.","triggerScenarios":"Thrown at src/shims.rs:1160 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Rename one of the case-variant wrappers (e.g. `Foo` vs `foo`) to a distinct spelling","Remove the duplicate wrapper","Pick names that are unique case-insensitively for cross-platform configs"],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"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"}