{"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":1414,"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":1396,"sourceCodeEnd":1432,"githubUrl":"https://github.com/jdx/mise/blob/afd2eddd3a50c16190efc1c7e94404b48f72af57/src/system/remote.rs#L1396-L1432","documentation":"After a remote `bootstrap_command` runs, `select_bootstrapped_mise` must pick exactly one mise executable. If the post-bootstrap PATH contains multiple candidates that are all 'unchanged' (none are new, none changed identity, none match the running mise version, and there is more than one), the installed path is ambiguous and this error names every candidate while telling the user to set the path explicitly.","triggerScenarios":"Running remote auto-provisioning where the bootstrap leaves ≥2 mise binaries on the remote PATH, and none is uniquely identified as new/changed/version-matching — e.g. a pre-existing mise plus a freshly installed one with identical version/fingerprint resolution, or several shim/wrapper scripts named mise.","commonSituations":"The host already had mise installed and the bootstrap installed a second copy; a wrapper script named `mise` shadows a real binary; mise exists in both /usr/local/bin and ~/.local/bin.","solutions":["Set `remote_mise` (or `mise_bin`) explicitly to the desired absolute path so selection is unambiguous.","Remove the extra mise executables from the remote PATH, keeping only one.","Adjust the bootstrap_command to install to a single fixed path (MISE_INSTALL_PATH) so only one candidate exists.","Ensure the bootstrap-installed mise reports the same version as the local mise so the version-matching selector can disambiguate it."],"exampleFix":"# before\nbootstrap_command = \"curl -fsSL https://mise.run | sh\"\n# after\nremote_mise = \"/usr/local/bin/mise\"\nbootstrap_command = \"curl -fsSL https://mise.run | MISE_INSTALL_PATH=/usr/local/bin/mise sh\"","handlingStrategy":"validation","validationCode":"# shell\nls -l $(compgen -c mise | sort -u | command -v mise 2>/dev/null) 2>/dev/null; which -a mise","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Keep exactly one mise on the remote PATH.","Pin remote_mise in project config for shared hosts.","Use MISE_INSTALL_PATH in bootstrap scripts to control placement."],"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-14T00:17:10.932Z"}