jdx/mise · error
install_mise must name an executable file
Error message
install_mise must name an executable file: {path:?} What it means
The final component of `install_mise` must name a file that can be executed: it cannot be empty (trailing '/'), '.', or '~'. The last segment check in `validate_install_mise_path` catches values pointing at a directory or the home/root rather than the mise binary, and throws this error.
Solutions
- Append the binary filename to the path (e.g. '/usr/local/bin/mise' not '/usr/local/bin/')
- Remove trailing slashes or '.' from the configured value
- If you meant a directory as install root, use the config option for the install directory instead of install_mise
Example fix
// before install_mise = "/usr/local/bin/" // after install_mise = '/usr/local/bin/mise'
Defensive patterns
Strategy: validation
Validate before calling
const last = p.split('/').pop();
if (!last || last === '.' || last === '~') throw new Error('must name an executable file'); Type guard
const namesExecutableFile = (s: unknown): s is string => {
if (typeof s !== 'string') return false;
const last = s.split('/').pop() ?? '';
return last !== '' && last !== '.' && last !== '~';
}; Try / catch
try { validate_install_mise_path(p)?; } catch (e) {
// append the binary filename and retry
} Prevention
- End install_mise with the binary name (e.g. /usr/local/bin/mise)
- Don't confuse install-directory options with the binary path option
- Validate paths end with a non-empty final segment in CI
When it happens
Trigger: install_mise ends with '/', '.', or equals something like '~/'; or the whole string is a directory such as '/usr/local/bin/'.
Common situations: Pointing install_mise at a bin directory intending mise to be placed inside it; copy-paste dropping the filename; templates that leave the filename empty.
Understand the failure class
Background: "Invalid value" and "allowed values are" config errors: what your library rejected and how to fix it — this error's family across 41 libraries.
Related errors
- install_mise must be an absolute path or start with ~/
- install_mise must not contain a newline
- managed system path must be absolute
- oci mount_point must be an absolute path
- settings. must resolve to an absolute path
AI-assisted analysis of jdx/mise@533346cc37 (2026-09-17).
Data as JSON: /api/errors/6a8ee6590c74469e.
Report an issue: GitHub.
Appendix: source
Thrown at src/system/remote.rs:2228
Ok(path.to_string())
}
fn validate_install_mise_path(path: &str) -> Result<()> {
validate_value("mise install path", path)?;
if path.contains(['\n', '\r']) {
bail!("install_mise must not contain a newline: {path:?}");
}
if !path.starts_with('/') && !path.starts_with("~/") {
bail!("install_mise must be an absolute path or start with ~/: {path:?}");
}
if path.split('/').any(|component| component == "..") {
bail!("install_mise must not contain '..': {path:?}");
}
if matches!(
path.rsplit('/').next(),
None | Some("") | Some(".") | Some("~")
) {
bail!("install_mise must name an executable file: {path:?}");
}
Ok(())
}
fn validate_remote_executable(command: &str) -> Result<()> {
validate_value("mise command", command)?;
let is_path = command.contains('/');
if command.starts_with('-')
|| command.contains(['\n', '\r'])
|| (!is_path && command.chars().any(char::is_whitespace))
{
bail!("remote mise command must be an executable name or path: {command:?}");
}
Ok(())
}
fn shell_quote(value: &str) -> String {
shell_words::join([value])View on GitHub (pinned to 533346cc37)