{"record":{"id":"c65b02c292dfe34c","repo":"jdx/mise","slug":"bootstrap-command-left-multiple-kind-mise-execut","errorCode":null,"errorMessage":"bootstrap_command left multiple {kind} mise executables and the installed path is ambiguous: {}; set remote_mise or mise_bin explicitly","messagePattern":"bootstrap_command left multiple (.+?) 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":1427,"sourceCode":"        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<_>>()\n                .join(\", \")\n        ),\n    }\n}\n\n#[derive(Clone, Copy, Debug, Eq, PartialEq)]\nenum LibcFlavor {\n    Glibc,\n    Musl,\n}\n\nimpl RemotePlatform {\n    fn description(&self) -> String {","sourceCodeStart":1409,"sourceCodeEnd":1445,"githubUrl":"https://github.com/jdx/mise/blob/afd2eddd3a50c16190efc1c7e94404b48f72af57/src/system/remote.rs#L1409-L1445","documentation":"`select_unique_remote_mise_candidate` is the shared helper that requires a candidate list from bootstrap discovery to contain 0 or 1 entries. If it is given two or more candidates of the given kind ('new', 'changed', or 'version-matching'), it bails with this error listing all of them, because the helper can only return a path when the choice is unambiguous.","triggerScenarios":"Remote bootstrap where, after filtering, two or more mise executables qualify under the same selection category: two newly-appeared binaries, two whose fingerprint/version identity changed, or two reporting the running mise's version — any such multiple match triggers the bail.","commonSituations":"Bootstrap installs mise into several PATH directories at once; PATH contains duplicate directories so the same install is discovered twice under different paths; a version-manager shim plus a real binary both report the expected version.","solutions":["Set `remote_mise`/`mise_bin` explicitly to bypass candidate selection entirely.","Deduplicate the remote PATH so each install location is searched once.","Make the bootstrap_command install to exactly one location.","Remove stale/competing mise binaries from the remote host."],"exampleFix":"// before (remote PATH: /usr/local/bin:/home/u/.local/bin:/home/u/.local/bin)\n// duplicate dir yields multiple candidates\n// after: fix PATH or pin the binary\nremote_mise = \"/usr/local/bin/mise\"","handlingStrategy":"validation","validationCode":"# shell\nwhich -a mise | sort -u | wc -l  # should be <= 1 for unambiguous selection","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Deduplicate PATH entries on remote hosts.","Avoid shim/wrapper scripts named `mise` shadowing real binaries.","Prefer explicit remote_mise over relying on auto-selection."],"tags":["ssh","bootstrap","remote","ambiguity"],"backgroundTag":"invalid-argument-value","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"}