{"record":{"id":"eeaa17167ace71b2","repo":"jdx/mise","slug":"install-mise-must-be-an-absolute-path-or-start-wit","errorCode":null,"errorMessage":"install_mise must be an absolute path or start with ~/: {path:?}","messagePattern":"install_mise must be an absolute path or start with ~/: (.+?)","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src/system/remote.rs","lineNumber":2217,"sourceCode":"fn validated_remote_command_output(output: &str) -> Result<String> {\n    validated_remote_command(output.strip_suffix('\\n').unwrap_or(output))\n}\n\nfn validated_absolute_remote_path_output(output: &str, kind: &str) -> Result<String> {\n    let path = output.strip_suffix('\\n').unwrap_or(output);\n    if !path.starts_with('/') || path.contains(['\\0', '\\n', '\\r']) {\n        bail!(\"{kind} returned an unsafe absolute path: {path:?}\");\n    }\n    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'])","sourceCodeStart":2199,"sourceCodeEnd":2235,"githubUrl":"https://github.com/jdx/mise/blob/afd2eddd3a50c16190efc1c7e94404b48f72af57/src/system/remote.rs#L2199-L2235","documentation":"mise validates the remote install_mise path must be addressable on the remote host: it must either be an absolute path starting with '/' or a home-relative path starting with '~/' . Relative paths like 'bin/mise' are ambiguous (depend on the remote CWD) and are rejected.","triggerScenarios":"Configuring install_mise with a relative path such as \"bin/mise\", a bare name like \"mise\", or a path that merely contains '~' but does not start with \"~/\" (e.g. \"~user/bin/mise\" fails only if it lacks the leading forms... any value not matching '/' or '~/' prefix).","commonSituations":"Users copying a local relative install location into remote config; assuming the remote CWD equals their home directory; writing \"mise\" expecting PATH lookup.","solutions":["Change the value to an absolute path such as /usr/local/bin/mise","Or use a home-relative path like ~/.local/bin/mise","If you need PATH-style lookup, resolve the absolute location of the binary first and configure that"],"exampleFix":"// before\ninstall_mise = \"bin/mise\"\n// after\ninstall_mise = \"~/.local/bin/mise\"","handlingStrategy":"validation","validationCode":"const isAddressable = (p) => typeof p === 'string' && (p.startsWith('/') || p.startsWith('~/'));","typeGuard":"const isAbsOrHomeRelative = (s) => typeof s === 'string' && (s.startsWith('/') || s.startsWith('~/'));","tryCatchPattern":"try { setInstallMisePath(p); } catch (e) { p = expandToAbsolute(p, remoteHome); setInstallMisePath(p); }","preventionTips":["Always configure absolute or ~/-prefixed paths for remote installs","Resolve relative paths against the remote home directory before configuring","Do not rely on remote CWD assumptions"],"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-14T05:17:10.506Z"}