jdx/mise · error

bootstrap_command left multiple {kind} mise executables and

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

`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.

Source

Thrown at src/system/remote.rs:1427

        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 afd2eddd3a)

Solutions

  1. Set `remote_mise`/`mise_bin` explicitly to bypass candidate selection entirely.
  2. Deduplicate the remote PATH so each install location is searched once.
  3. Make the bootstrap_command install to exactly one location.
  4. Remove stale/competing mise binaries from the remote host.

Example fix

// before (remote PATH: /usr/local/bin:/home/u/.local/bin:/home/u/.local/bin)
// duplicate dir yields multiple candidates
// after: fix PATH or pin the binary
remote_mise = "/usr/local/bin/mise"
Defensive patterns

Strategy: validation

Validate before calling

# shell
which -a mise | sort -u | wc -l  # should be <= 1 for unambiguous selection

Prevention

When it happens

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

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

Understand the failure class

Background: "Must be a positive integer", "Invalid value", "Unsupported": the invalid-argument-value error family, when a library rejects the value you pass — this error's family across 35 libraries.

Related errors


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