{"record":{"id":"28b6bfd3f2d023fb","repo":"jdx/mise","slug":"mise-executable-not-found-after-bootstrap-command","errorCode":null,"errorMessage":"mise executable not found after bootstrap_command","messagePattern":"mise executable not found after bootstrap_command","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src/system/remote.rs","lineNumber":1412,"sourceCode":"                .get(*candidate)\n                .and_then(Option::as_ref)\n                .and_then(|identity| identity.version.split_whitespace().next())\n                .is_some_and(|version| {\n                    version == env!(\"CARGO_PKG_VERSION\")\n                        || version == concat!(env!(\"CARGO_PKG_VERSION\"), \"-DEBUG\")\n                })\n        })\n        .collect::<Vec<_>>();\n    if let Some(candidate) =\n        select_unique_remote_mise_candidate(version_candidates, \"version-matching\")?\n    {\n        return Ok(candidate);\n    }\n    if let [candidate] = after {\n        return Ok(candidate.clone());\n    }\n    if after.is_empty() {\n        bail!(\"mise executable not found after bootstrap_command\");\n    }\n    bail!(\n        \"bootstrap_command left multiple unchanged mise executables and the installed path is ambiguous: {}; set remote_mise or mise_bin explicitly\",\n        after.join(\", \")\n    )\n}\n\nfn select_unique_remote_mise_candidate(\n    candidates: Vec<&String>,\n    kind: &str,\n) -> Result<Option<String>> {\n    match candidates.as_slice() {\n        [] => Ok(None),\n        [candidate] => Ok(Some((*candidate).clone())),\n        _ => bail!(\n            \"bootstrap_command left multiple {kind} mise executables and the installed path is ambiguous: {}; set remote_mise or mise_bin explicitly\",\n            candidates\n                .iter()","sourceCodeStart":1394,"sourceCodeEnd":1430,"githubUrl":"https://github.com/jdx/mise/blob/afd2eddd3a50c16190efc1c7e94404b48f72af57/src/system/remote.rs#L1394-L1430","documentation":"In `select_bootstrapped_mise` (src/system/remote.rs), after running a user-provided `bootstrap_command` on a remote host, mise snapshots the PATH of mise executables before and after. If the 'after' snapshot is completely empty — no mise binary exists anywhere on the remote PATH — this error is thrown because there is nothing to select as the remote mise executable.","triggerScenarios":"Calling the remote-provisioning path (auto-installing mise on a remote host over SSH) where `bootstrap_command` runs successfully but installs nothing findable on PATH: the bootstrap script exits 0 without installing mise, installs to a location outside the searched PATH, or the PATH lookup returns no candidates at all.","commonSituations":"A bootstrap_command that silently fails (e.g. `curl ... | sh` piped output suppressed yet download failed), a script that installs mise for a different user's home (~/.local/bin not on the SSH non-login PATH), or a typo'd install URL yielding an empty directory.","solutions":["Set `remote_mise` (or `mise_bin`) explicitly to the absolute path of the mise executable on the remote host so bootstrap discovery is skipped.","Run the bootstrap_command manually on the remote host and verify a mise binary actually exists (`which mise`).","Fix the bootstrap_command so it installs mise into a directory on the remote non-interactive PATH (e.g. /usr/local/bin).","Check SSH PATH for the login used — non-login SSH sessions often omit ~/.local/bin; add an export in the bootstrap script."],"exampleFix":"// before\nbootstrap_command = \"curl -fsSL https://mise.run | sh\"\n// after\nremote_mise = \"~/.local/bin/mise\"\n# or make the bootstrap place it on a known PATH:\n# bootstrap_command = \"curl -fsSL https://mise.run | MISE_INSTALL_PATH=/usr/local/bin/mise sh\"","handlingStrategy":"validation","validationCode":"# shell (run before/instead of bootstrap)\ncommand -v mise || { curl -fsSL https://mise.run | MISE_INSTALL_PATH=/usr/local/bin/mise sh; }","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Always set remote_mise/mise_bin for hosts with non-standard PATH layouts.","Test bootstrap_command interactively over `ssh host` (non-login PATH) before relying on it.","Install mise to a fixed absolute path in bootstrap scripts."],"tags":["ssh","bootstrap","remote","path"],"backgroundTag":"file-not-found","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"}