jdx/mise · error

bootstrap_command left multiple

Error message

bootstrap_command left multiple {kind} mise executables and the installed path is ambiguous: {}; set remote_mise or mise_bin explicitly

What it means

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.

Solutions

  1. Set remote_mise or mise_bin explicitly to disambiguate
  2. Change bootstrap_command so it writes exactly one mise executable
  3. Delete redundant mise binaries on the host so only one candidate matches
  4. Ensure pre-existing installs do not already report the same version (upgrade or remove them) so the candidate set stays small

Example fix

// before
bootstrap_command("install-mise-everywhere.sh") // writes to /usr/local/bin and ~/.local/bin
// after
.mise_bin("/usr/local/bin/mise")
.bootstrap_command("install-mise-everywhere.sh")
Defensive patterns

Strategy: validation

Validate before calling

count=$(ssh host 'sh -c 'ls -1 ~/.local/bin/mise /usr/local/bin/mise 2>/dev/null | wc -l''); [ "$count" -le 1 ]

Type guard

fn single_candidate(candidates: &[&String]) -> Option<&String> { if candidates.len() == 1 { Some(candidates[0]) } else { None } }

Try / catch

match res { Err(e) if e.message.contains("ambiguous") && e.message.contains("new") => dedupe_hosts(), other => other? }

Prevention

When it happens

Trigger: 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.

Common situations: 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.

Related errors


AI-assisted analysis of jdx/mise@533346cc37 (2026-09-17). Data as JSON: /api/errors/c65b02c292dfe34c. Report an issue: GitHub.

Appendix: source

Thrown at src/system/remote.rs:1429

        return Ok(candidate.clone());
    }
    if after.is_empty() {
        bail!("mise executable not found after bootstrap_command");
    }
    bail!(
        "bootstrap_command left multiple unchanged mise executables and the installed path is ambiguous: {}; set remote_mise or mise_bin explicitly",
        after.join(", ")
    )
}

fn select_unique_remote_mise_candidate(
    candidates: Vec<&String>,
    kind: &str,
) -> Result<Option<String>> {
    match candidates.as_slice() {
        [] => Ok(None),
        [candidate] => Ok(Some((*candidate).clone())),
        _ => bail!(
            "bootstrap_command left multiple {kind} mise executables and the installed path is ambiguous: {}; set remote_mise or mise_bin explicitly",
            candidates
                .iter()
                .map(|candidate| candidate.as_str())
                .collect::<Vec<_>>()
                .join(", ")
        ),
    }
}

#[derive(Clone, Copy, Debug, Eq, PartialEq)]
enum LibcFlavor {
    Glibc,
    Musl,
}

impl RemotePlatform {
    fn description(&self) -> String {

View on GitHub (pinned to 533346cc37)