{"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":1414,"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":1396,"sourceCodeEnd":1432,"githubUrl":"https://github.com/jdx/mise/blob/533346cc374382b41ec5ff70536252b2e96e725c/src/system/remote.rs#L1396-L1432","documentation":"After running the user-configured bootstrap_command on a remote host, mise re-scans for mise executables and tries to identify which binary the bootstrap produced. If the post-bootstrap candidate list is completely empty, no mise executable exists anywhere it looks, and it throws this error.","triggerScenarios":"Running a remote operation that invokes bootstrap_command when the command failed silently, installed mise to a non-standard path not in PATH or the well-known locations, or the remote user's PATH/HOME differs from what discovery scans.","commonSituations":"bootstrap_command that installs mise for a different user or into a custom prefix; remote login shell rc files that change PATH; bootstrap script failing without propagating its exit code; misconfigured HOME on the remote host.","solutions":["Fix bootstrap_command so it installs mise into a scanned location (PATH, ~/.local/bin, /usr/local/bin, etc.)","Set remote_mise or mise_bin explicitly to the installed path so no post-bootstrap selection is needed","Run the bootstrap command manually over SSH to see why it produced no binary","Check that the remote user's PATH and HOME match the environment discovery scans"],"exampleFix":"// before\nremote_config.bootstrap_command(\"curl https://mise.jdx.dev/install.sh | sh\")\n// after (deterministic install path)\nremote_config.bootstrap_command(\"curl https://mise.jdx.dev/install.sh | MISE_INSTALL_PATH=/usr/local/bin/mise sh\")\n  .mise_bin(\"/usr/local/bin/mise\")","handlingStrategy":"validation","validationCode":"test -x \"$MISE_BIN\" || which mise || echo 'no mise found'   # run over SSH before bootstrap","typeGuard":"fn bootstrap_yielded_mise(after: &[String]) -> bool { !after.is_empty() }","tryCatchPattern":"if let Err(e) = res { if e.to_string().contains(\"not found after bootstrap_command\") { log_bootstrap_output(); fix_bootstrap(); } }","preventionTips":["Install mise into a standard scanned location (~/.local/bin, /usr/local/bin, ~/.cargo/bin)","Have bootstrap_command fail loudly (set -e) so silent install failures surface","Pin the install path with MISE_INSTALL_PATH and set mise_bin to match","Verify remote PATH and HOME are what you expect before bootstrapping"],"tags":["remote","bootstrap","mise-not-found"],"backgroundTag":"file-not-found","analyzedSha":"533346cc374382b41ec5ff70536252b2e96e725c","analyzedAt":"2026-09-17T13:35:38.149Z","contentChangedAt":"2026-09-17T13:35:38.149Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}