{"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":1133,"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":1115,"sourceCodeEnd":1151,"githubUrl":"https://github.com/jdx/mise/blob/afd2eddd3a50c16190efc1c7e94404b48f72af57/src/shims.rs#L1115-L1151","documentation":"On Windows, command wrapper names must not contain dots, because wrapper lookup and shim creation interact with Windows executable name handling (extension stripping, PATHEXT resolution), and dotted names create ambiguous or broken shim filenames. This check only fires when compiled for Windows (cfg!(windows)).","triggerScenarios":"On Windows, declaring a wrapper name like `my.tool` or `python3.12` in the command wrapper configuration or via `mise wrapper add my.tool ...`.","commonSituations":"Porting a mise.toml with wrappers from macOS/Linux to Windows where names like `terraform.fmt` were legal on Unix; versioned command names containing dots.","solutions":["Rename the wrapper to a dot-free identifier (e.g. `terraform-fmt` instead of `terraform.fmt`).","Use hyphens or underscores in place of dots in the wrapper name.","Keep the dotted name only for the underlying command path, not the wrapper name.","If you need platform parity, conditionally define wrapper names per OS in your config tooling."],"exampleFix":"// before (mise.toml, Windows)\n[wrapper]\n\"terraform.fmt\" = \"terraform fmt\"\n\n// after\n[wrapper]\n\"terraform-fmt\" = \"terraform fmt\"","handlingStrategy":"validation","validationCode":"// bash: on Windows, reject dotted wrapper names before writing config\nif [[ \"$(uname -s)\" == MINGW* || \"$(uname -s)\" == CYGWIN* ]]; then\n  [[ \"$name\" == *.* ]] && echo \"Windows: wrapper names cannot contain dots: $name\" && exit 1\nfi","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Avoid dots in wrapper names entirely for cross-platform configs.","Use hyphens/underscores instead of dots (terraform-fmt, python3-12).","Keep dotted/versioned identifiers in the command path, not the name.","Test shared mise.toml wrapper sections on Windows before merging."],"tags":["windows","validation","shims","config","rust"],"backgroundTag":"invalid-identifier-format","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"}