{"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":2226,"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":2208,"sourceCodeEnd":2244,"githubUrl":"https://github.com/jdx/mise/blob/afd2eddd3a50c16190efc1c7e94404b48f72af57/src/system/remote.rs#L2208-L2244","documentation":"Beyond prefix checks, mise requires the install_mise path to name an actual file: the final path component (after the last '/') must not be empty, '.', or '~'. This catches values that designate a directory or home alias rather than the mise executable.","triggerScenarios":"Configuring install_mise as \"/usr/local/bin/\" (trailing slash), \"~/\", \"/opt/.\", or just \"~\" — i.e. any value whose last component is empty, '.', or '~'.","commonSituations":"Copy-paste of a directory path instead of the binary path; editing configs and leaving a trailing slash; assuming mise resolves directories automatically.","solutions":["Point the value at the mise binary file itself, e.g. /usr/local/bin/mise","Remove trailing slashes or '.' components from the configured path","Verify with `ls -l <path>` on the remote host that it is an executable file"],"exampleFix":"// before\ninstall_mise = \"/usr/local/bin/\"\n// after\ninstall_mise = \"/usr/local/bin/mise\"","handlingStrategy":"validation","validationCode":"const namesFile = (p) => { const last = p.split('/').pop(); return last !== '' && last !== '.' && last !== '~'; };","typeGuard":"const lastComponentIsFile = (s) => { if (typeof s !== 'string') return false; const last = s.split('/').pop(); return last !== '' && last !== '.' && last !== '~'; };","tryCatchPattern":"try { setInstallMisePath(p); } catch (e) { console.error('install_mise must point to the mise binary file'); }","preventionTips":["Configure the full path to the mise executable, not its directory","Strip trailing slashes when accepting path input","Verify with `test -x <path>` on the remote host"],"tags":["config","path-validation"],"backgroundTag":"invalid-config-value","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"}