{"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":1429,"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":1411,"sourceCodeEnd":1447,"githubUrl":"https://github.com/jdx/mise/blob/533346cc374382b41ec5ff70536252b2e96e725c/src/system/remote.rs#L1411-L1447","documentation":"This is the generalized variant of the bootstrap ambiguity error. When selecting a unique mise candidate after bootstrap_command, if more than one candidate falls into the same category (\"new\", \"changed\", or \"version-matching\"), select_unique_remote_mise_candidate cannot pick one and throws, interpolating the category kind and all candidate paths.","triggerScenarios":"bootstrap_command produces or modifies multiple mise executables simultaneously: e.g. installs into two PATH directories at once, or several existing installs already report the local mise version so multiple \"version-matching\" candidates exist.","commonSituations":"bootstrap scripts that sync mise to several bin directories; hosts where an old install already matches the running mise version so the version-matching filter also matches multiple paths; shared /usr/local/bin plus per-user installs both touched by provisioning.","solutions":["Set remote_mise or mise_bin explicitly to disambiguate","Change bootstrap_command so it writes exactly one mise executable","Delete redundant mise binaries on the host so only one candidate matches","Ensure pre-existing installs do not already report the same version (upgrade or remove them) so the candidate set stays small"],"exampleFix":"// before\nbootstrap_command(\"install-mise-everywhere.sh\") // writes to /usr/local/bin and ~/.local/bin\n// after\n.mise_bin(\"/usr/local/bin/mise\")\n.bootstrap_command(\"install-mise-everywhere.sh\")","handlingStrategy":"validation","validationCode":"count=$(ssh host 'sh -c 'ls -1 ~/.local/bin/mise /usr/local/bin/mise 2>/dev/null | wc -l''); [ \"$count\" -le 1 ]","typeGuard":"fn single_candidate(candidates: &[&String]) -> Option<&String> { if candidates.len() == 1 { Some(candidates[0]) } else { None } }","tryCatchPattern":"match res { Err(e) if e.message.contains(\"ambiguous\") && e.message.contains(\"new\") => dedupe_hosts(), other => other? }","preventionTips":["Ensure bootstrap_command touches exactly one mise path","Remove stale mise installs that already report the target version","Set mise_bin explicitly on multi-install hosts","Document the canonical mise location per host in provisioning tooling"],"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"}