{"record":{"id":"b7063d0cd8cec3d1","repo":"jdx/mise","slug":"command-wrapper-names-cannot-contain-dots-on-windo","errorCode":null,"errorMessage":"command wrapper names cannot contain dots on Windows: {name:?}","messagePattern":"command wrapper names cannot contain dots on Windows: (.+?)","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src/shims.rs","lineNumber":1150,"sourceCode":"\npub(crate) fn command_name_without_exe_suffix(bin_name: &str) -> &str {\n    let suffix = std::env::consts::EXE_SUFFIX;\n    if suffix.is_empty() {\n        return bin_name;\n    }\n    let suffix_start = bin_name.len().saturating_sub(suffix.len());\n    match (bin_name.get(..suffix_start), bin_name.get(suffix_start..)) {\n        (Some(name), Some(actual_suffix)) if actual_suffix.eq_ignore_ascii_case(suffix) => name,\n        _ => bin_name,\n    }\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","sourceCodeStart":1132,"sourceCodeEnd":1168,"githubUrl":"https://github.com/jdx/mise/blob/533346cc374382b41ec5ff70536252b2e96e725c/src/shims.rs#L1132-L1168","documentation":"On Windows builds, validate_wrapper_name additionally rejects wrapper names containing a dot, because shim naming/extension handling on Windows treats the dot as the exe-suffix boundary and a dotted name would collide or resolve wrong.","triggerScenarios":"Thrown at src/shims.rs:1150 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Replace dots with dashes in the wrapper name on Windows","Keep dotted wrapper names only for non-Windows configs","Wrap the config entry per-OS if both forms are needed"],"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"}