{"record":{"id":"6a8ee6590c74469e","repo":"jdx/mise","slug":"install-mise-must-name-an-executable-file-path","errorCode":null,"errorMessage":"install_mise must name an executable file: {path:?}","messagePattern":"install_mise must name an executable file: (.+?)","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src/system/remote.rs","lineNumber":2228,"sourceCode":"    Ok(path.to_string())\n}\n\nfn validate_install_mise_path(path: &str) -> Result<()> {\n    validate_value(\"mise install path\", path)?;\n    if path.contains(['\\n', '\\r']) {\n        bail!(\"install_mise must not contain a newline: {path:?}\");\n    }\n    if !path.starts_with('/') && !path.starts_with(\"~/\") {\n        bail!(\"install_mise must be an absolute path or start with ~/: {path:?}\");\n    }\n    if path.split('/').any(|component| component == \"..\") {\n        bail!(\"install_mise must not contain '..': {path:?}\");\n    }\n    if matches!(\n        path.rsplit('/').next(),\n        None | Some(\"\") | Some(\".\") | Some(\"~\")\n    ) {\n        bail!(\"install_mise must name an executable file: {path:?}\");\n    }\n    Ok(())\n}\n\nfn validate_remote_executable(command: &str) -> Result<()> {\n    validate_value(\"mise command\", command)?;\n    let is_path = command.contains('/');\n    if command.starts_with('-')\n        || command.contains(['\\n', '\\r'])\n        || (!is_path && command.chars().any(char::is_whitespace))\n    {\n        bail!(\"remote mise command must be an executable name or path: {command:?}\");\n    }\n    Ok(())\n}\n\nfn shell_quote(value: &str) -> String {\n    shell_words::join([value])","sourceCodeStart":2210,"sourceCodeEnd":2246,"githubUrl":"https://github.com/jdx/mise/blob/533346cc374382b41ec5ff70536252b2e96e725c/src/system/remote.rs#L2210-L2246","documentation":"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.","triggerScenarios":"install_mise ends with '/', '.', or equals something like '~/'; or the whole string is a directory such as '/usr/local/bin/'.","commonSituations":"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.","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"],"exampleFix":"// before\ninstall_mise = \"/usr/local/bin/\"\n// after\ninstall_mise = '/usr/local/bin/mise'","handlingStrategy":"validation","validationCode":"const last = p.split('/').pop();\nif (!last || last === '.' || last === '~') throw new Error('must name an executable file');","typeGuard":"const namesExecutableFile = (s: unknown): s is string => {\n  if (typeof s !== 'string') return false;\n  const last = s.split('/').pop() ?? '';\n  return last !== '' && last !== '.' && last !== '~';\n};","tryCatchPattern":"try { validate_install_mise_path(p)?; } catch (e) {\n  // append the binary filename and retry\n}","preventionTips":["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"],"tags":["config","path","validation"],"backgroundTag":"invalid-config-value","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"}