jdx/mise · error · eyre::Report
invalid tool path {s:?}: extended-length and device paths (\
Error message
invalid tool path {s:?}: extended-length and device paths (\\\\?\\, \\\\.\\) are not supported What it means
Error "invalid tool path {s:?}: extended-length and device paths (\\\\?\\, \\\\.\\) are not supported" thrown in jdx/mise.
Source
Thrown at src/toolset/tool_request.rs:566
/// The list is written for a POSIX shell, which is why `\` is on it. On Windows `\` is a path
/// separator instead, so it is rewritten by [`windows_path_separators`] before it gets here rather
/// than being allowed through — see that function. The shell those hooks run through there is
/// `cmd.exe`, whose metacharacters are a different set, so a few more are rejected on Windows —
/// see [`is_forbidden_path_char`].
fn validate_path_string(s: &str) -> Result<()> {
if s.is_empty() {
return Ok(());
}
if let Some(c) = s.chars().find(|c| {
// Allow newlines/tabs/etc. in paths is still bad — keep control-char
// and quote/expansion rejection, but allow `/` since paths need it.
is_forbidden_path_char(*c)
}) {
// The only `\` that survives the rewrite is an extended-length or device prefix, so say
// what is actually wrong instead of naming a character the user cannot avoid.
#[cfg(windows)]
if c == '\\' {
bail!(
"invalid tool path {s:?}: extended-length and device paths (\\\\?\\, \\\\.\\) are not supported"
);
}
bail!("invalid tool path {s:?}: contains forbidden character {c:?}");
}
Ok(())
}
/// Rewrite `\` to `/` in a `path:` value on Windows.
///
/// `\` is the path separator there, not a shell metacharacter, so [`validate_path_string`] used to
/// reject every native path — anything copied out of Explorer or printed by `pwd`. Win32 accepts
/// `/` wherever it accepts `\`, so rewriting is what makes those usable *without* letting a `\`
/// reach a vfox hook's `ctx.rootPath`, which is the thing the list exists to prevent (#9814). The
/// alternative — dropping `\` from the list on Windows — would have weakened that.
///
/// Extended-length and device prefixes (`\\?\`, `\\.\`) are left alone. Those are the one place
/// Windows does not accept `/`, so rewriting would hand back a path that looks right and does notView on GitHub (pinned to 6f52dcdf99)
Solutions
- Use a normal path instead of an extended-length (`\\?\`) or device (`\\.\`) path for the tool.
When it happens
Trigger: Thrown at src/toolset/tool_request.rs:566 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of jdx/mise@6f52dcdf99 (2026-08-22).
Data as JSON: /api/errors/aab4ec6da1d8617e.
Report an issue: GitHub.