jdx/mise · error
windows_script_interpreter
Error message
windows_script_interpreter: {interpreter:?} must be a plain executable name What it means
The windows_script_interpreter setting names the executable that will head a generated .cmd launcher on Windows. It must be a bare executable name (ASCII alphanumerics, `.`, `_`, `-` only) because it is written directly into the launcher body; anything else (paths, flags, quoting) is rejected to avoid producing a broken or unsafe command line.
Solutions
- Set windows_script_interpreter to a bare name resolvable on PATH, e.g. `python` or `node`
- Move flags into the script itself or env config, not the interpreter setting
- Remove path components; rely on mise-managed PATH for resolution
Example fix
// before windows_script_interpreter = "C:/Program Files/Python/python.exe" // after windows_script_interpreter = "python"
Defensive patterns
Strategy: validation
Validate before calling
// bash: reject interpreter settings that aren't a plain executable name
[[ "$windows_script_interpreter" =~ ^[A-Za-z0-9._-]+$ ]] || { echo 'use a bare name like python'; exit 1; } Type guard
// rust
fn is_plain_bin_name(s: &str) -> bool {
!s.is_empty() && s.chars().all(|c| c.is_ascii_alphanumeric() || matches!(c, '.' | '_' | '-'))
} Prevention
- Always use bare executable names resolvable via PATH for windows_script_interpreter
- Pass interpreter flags via the script's shebang or env, never the interpreter setting
- Avoid absolute paths and spaces in the setting
When it happens
Trigger: Setting windows_script_interpreter to a path like `C:/tools/python/python.exe`, arguments like `python -u`, or non-ASCII names, then writing a Windows script launcher (install or the launcher tests).
Common situations: Copying a full interpreter path from a working config; trying to pass interpreter flags through the setting; Unicode executable names.
Understand the failure class
Background: "Must be a positive integer", "Invalid value", "Unsupported": the invalid-argument-value error family, when a library rejects the value you pass — this error's family across 35 libraries.
Related errors
- Windows script file name
- agent ' ' `start_calendar_interval. ` must be between and
- agent ' ' `start_calendar_interval` must set at least one…
- agent ' ' `start_calendar_interval` must not be empty
- agent ' ' `queue_directories` must not contain empty entries
AI-assisted analysis of jdx/mise@533346cc37 (2026-09-17).
Data as JSON: /api/errors/dac1bb13b7d9253e.
Report an issue: GitHub.
Appendix: source
Thrown at src/backend/http.rs:1043
);
return None;
}
let file_algo = crate::backend::asset_matcher::detect_checksum_algorithm(
&get_filename_from_url(&checksum_url),
);
fetch_checksum_from_file(&checksum_url, &file_algo).await
}
}
#[cfg(any(windows, test))]
fn windows_script_launcher(script: &Path, interpreter: &str) -> Result<(PathBuf, String)> {
ensure_plain_bin_name("windows_script_interpreter", interpreter)?;
if interpreter.is_empty()
|| !interpreter
.chars()
.all(|ch| ch.is_ascii_alphanumeric() || matches!(ch, '.' | '_' | '-'))
{
eyre::bail!("windows_script_interpreter: {interpreter:?} must be a plain executable name");
}
let filename = script
.file_name()
.and_then(|filename| filename.to_str())
.ok_or_else(|| eyre::eyre!("Windows script launcher requires a UTF-8 file name"))?;
ensure_plain_bin_name("windows script", filename)?;
if filename.is_empty()
|| !filename
.chars()
.all(|ch| ch.is_ascii_alphanumeric() || matches!(ch, '.' | '_' | '-'))
{
eyre::bail!("Windows script file name {filename:?} contains unsupported characters");
}
let launcher = script.with_file_name(format!("{filename}.cmd"));
let body = format!("@echo off\r\n{interpreter} \"%~dp0{filename}\" %*\r\n");
Ok((launcher, body))
}
View on GitHub (pinned to 533346cc37)