{"record":{"id":"c04deb5c6bbb7293","repo":"jdx/mise","slug":"bootstrap-command-left-multiple-unchanged-mise-exe","errorCode":null,"errorMessage":"bootstrap_command left multiple unchanged mise executables and the installed path is ambiguous: {}; set remote_mise or mise_bin explicitly","messagePattern":"bootstrap_command left multiple unchanged mise executables and the installed path is ambiguous: (.+?); set remote_mise or mise_bin explicitly","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src/system/remote.rs","lineNumber":1416,"sourceCode":"                .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()\n                .map(|candidate| candidate.as_str())\n                .collect::<Vec<_>>()","sourceCodeStart":1398,"sourceCodeEnd":1434,"githubUrl":"https://github.com/jdx/mise/blob/533346cc374382b41ec5ff70536252b2e96e725c/src/system/remote.rs#L1398-L1434","documentation":"After bootstrap_command runs, mise must know exactly which binary was installed/changed to proceed safely. If more than one pre-existing candidate remains with unchanged identity (no new, changed, or version-matching candidate isolates one), the installed path is ambiguous and mise refuses to guess, listing all candidates and asking for an explicit configuration.","triggerScenarios":"Running a remote operation with bootstrap_command when the remote host already has multiple mise executables (e.g. one in ~/.local/bin and one in /usr/local/bin) and the bootstrap either replaced several of them or none of them, so no single new/changed/version-matching candidate exists.","commonSituations":"Hosts with mise installed both via the install script and via a package manager; bootstrap_command that updates all existing mise installs; stale duplicate installs after manual upgrades; multiple users' mise binaries visible in shared PATH directories.","solutions":["Set remote_mise or mise_bin explicitly to the path of the mise binary you intend to use","Remove duplicate mise installations from the remote host so only one candidate exists","Adjust bootstrap_command to install to a fresh unique path so exactly one new candidate is detected","Clean up PATH ordering on the remote host so only one mise is discoverable"],"exampleFix":"// before\nremote_config.bootstrap_command(\"curl https://mise.jdx.dev/install.sh | sh\")\n// after\nremote_config.mise_bin(\"/home/deploy/.local/bin/mise\")\n  .bootstrap_command(\"curl https://mise.jdx.dev/install.sh | MISE_INSTALL_PATH=/home/deploy/.local/bin/mise sh\")","handlingStrategy":"validation","validationCode":"ssh host 'sh -c 'for p in \"$(command -v mise)\" \"$HOME/.local/bin/mise\" /usr/local/bin/mise; do [ -x \"$p\" ] && echo \"$p\"; done'' # ensure exactly one","typeGuard":"fn unambiguous(candidates: &[String]) -> bool { candidates.len() == 1 }","tryCatchPattern":"match res { Err(e) if e.message.contains(\"ambiguous\") => configure_mise_bin_from(e.message), other => other? }","preventionTips":["Keep only one mise installation per host","Always set remote_mise or mise_bin when a host is known to have multiple mise binaries","Make bootstrap_command install to a single deterministic path","Periodically audit remote hosts for duplicate mise binaries"],"tags":["remote","bootstrap","ambiguous-path"],"backgroundTag":"ambiguous-target","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"}