{"record":{"id":"b12f696598231486","repo":"jdx/mise","slug":"relative-remote-mise-path-does-not-name-an-executa","errorCode":null,"errorMessage":"relative remote mise path does not name an executable: {command:?}","messagePattern":"relative remote mise path does not name an executable: (.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src/system/remote.rs","lineNumber":1259,"sourceCode":"        }\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() {\n        bail!(\"relative remote mise path does not name an executable: {command:?}\");\n    }\n    Ok(format!(\"{project}/{}\", components.join(\"/\")))\n}\n\nfn remote_mise_find_script() -> &'static str {\n    r#\"mise_path=$(command -v mise 2>/dev/null || true)\ncase \"$mise_path\" in /*) ;; *) mise_path= ;; esac\nif [ -z \"$mise_path\" ]; then\n  for candidate in \"$HOME/.local/bin/mise\" \"$HOME/.local/share/mise/bin/mise\" \"$HOME/.cargo/bin/mise\" /usr/local/bin/mise /opt/homebrew/bin/mise; do\n    if [ -x \"$candidate\" ]; then\n      mise_path=$candidate\n      break\n    fi\n  done\nfi\"#\n}\n\nfn remote_mise_output_script() -> String {","sourceCodeStart":1241,"sourceCodeEnd":1277,"githubUrl":"https://github.com/jdx/mise/blob/afd2eddd3a50c16190efc1c7e94404b48f72af57/src/system/remote.rs#L1241-L1277","documentation":"After normalization, a relative remote mise path must still name an executable; if all components resolve away (e.g. \".\", \"./\", or \"a/..\") the resulting path inside the project is empty, so mise rejects it rather than executing the project directory itself.","triggerScenarios":"Passing a relative remote mise path like \".\", \"./\", \"x/..\" or an otherwise empty-resolving path to the resolver that prefixes the staged project.","commonSituations":"Empty or placeholder config values that yield \".\"; templating bugs where the executable segment of a relative path is dropped, leaving only directory dots.","solutions":["Provide a path with at least one real component naming the binary, e.g. \"bin/mise\"","Fix the templating/config that produced an empty or dot-only path","Prefer an absolute or \"~/\"-prefixed path where the executable location is fixed"],"exampleFix":"// before\nremote_mise = \".\"\n// after\nremote_mise = \"bin/mise\"","handlingStrategy":"validation","validationCode":"const nonEmptyRelative = (rel) => typeof rel === 'string' && !rel.startsWith('/') && rel.split('/').filter(s => s && s !== '.' && s !== '..').length > 0;","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Reject dot-only or placeholder path values in config","Ensure templating always emits an executable segment","Test config expansion outputs before remote deployment"],"tags":["path","validation","remote","config"],"backgroundTag":"empty-required-field","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"}