{"record":{"id":"4b3de8fcaf3f4490","repo":"jdx/mise","slug":"remote-mise-path-does-not-name-an-executable-com","errorCode":null,"errorMessage":"remote mise path does not name an executable: {command:?}","messagePattern":"remote mise path does not name an executable: (.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src/system/remote.rs","lineNumber":1240,"sourceCode":"esac\"#,\n        shell_quote(command),\n        shell_quote(command),\n    );\n    let output = session.output_async(&[\"sh\", \"-lc\", &script]).await?;\n    validated_absolute_remote_path_output(&output, \"remote login executable\")\n}\n\nfn resolve_remote_mise_path(\n    command: &str,\n    project: &str,\n    remote_home: Option<&str>,\n) -> Result<String> {\n    if command.starts_with('/') {\n        return Ok(command.to_string());\n    }\n    if let Some(suffix) = command.strip_prefix(\"~/\") {\n        if suffix.is_empty() {\n            bail!(\"remote mise path does not name an executable: {command:?}\");\n        }\n        let home = remote_home.ok_or_else(|| eyre!(\"remote login home was not resolved\"))?;\n        return Ok(format!(\"{}/{suffix}\", home.trim_end_matches('/')));\n    }\n\n    let mut components = Vec::new();\n    for component in command.split('/') {\n        match component {\n            \"\" | \".\" => {}\n            \"..\" => {\n                if components.pop().is_none() {\n                    bail!(\"relative remote mise path escapes the staged project: {command:?}\");\n                }\n            }\n            component => components.push(component),\n        }\n    }\n    if components.is_empty() {","sourceCodeStart":1222,"sourceCodeEnd":1258,"githubUrl":"https://github.com/jdx/mise/blob/afd2eddd3a50c16190efc1c7e94404b48f72af57/src/system/remote.rs#L1222-L1258","documentation":"This helper resolves the remote mise executable path. A command starting with ~ must name a home-relative executable; a bare \"~/\" (empty suffix) names nothing and is rejected rather than silently resolving to the home directory.","triggerScenarios":"Passing \"~/\" (or a command whose home-relative expansion is empty) as the remote mise path into the resolver that receives remote_home.","commonSituations":"Config templating where an environment variable that should hold the binary name is empty, producing \"~/\"; hand-edited remote mise path settings missing the executable name.","solutions":["Set the full path including the executable name, e.g. ~/bin/mise or ~/.local/bin/mise","Fix the template/variable that is empty so the path is not just \"~/\"","Use an absolute path (starting with /) if the location is known"],"exampleFix":"// before\nremote_mise = \"~/\"\n// after\nremote_mise = \"~/.local/bin/mise\"","handlingStrategy":"validation","validationCode":"const validHomePath = (cmd) => typeof cmd === 'string' && cmd.startsWith('~/') && cmd.length > 2;","typeGuard":"const namesExecutable = (cmd) => cmd.startsWith('/') || (cmd.startsWith('~/') && cmd.slice(2).trim() !== '');","tryCatchPattern":null,"preventionTips":["Always include the executable name after \"~/\"","Validate templated remote paths before deployment (reject bare \"~/\")","Prefer absolute paths for fixed install locations"],"tags":["path","validation","remote","config"],"backgroundTag":"invalid-argument-format","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"}