jdx/mise · error

bootstrap_command left multiple unchanged mise executables…

Error message

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

What it means

After bootstrap_command runs, mise must know exactly which binary was installed/changed to proceed safely. If more than one pre-existing candidate remains with unchanged identity (no new, changed, or version-matching candidate isolates one), the installed path is ambiguous and mise refuses to guess, listing all candidates and asking for an explicit configuration.

Solutions

  1. Set remote_mise or mise_bin explicitly to the path of the mise binary you intend to use
  2. Remove duplicate mise installations from the remote host so only one candidate exists
  3. Adjust bootstrap_command to install to a fresh unique path so exactly one new candidate is detected
  4. Clean up PATH ordering on the remote host so only one mise is discoverable

Example fix

// before
remote_config.bootstrap_command("curl https://mise.jdx.dev/install.sh | sh")
// after
remote_config.mise_bin("/home/deploy/.local/bin/mise")
  .bootstrap_command("curl https://mise.jdx.dev/install.sh | MISE_INSTALL_PATH=/home/deploy/.local/bin/mise sh")
Defensive patterns

Strategy: validation

Validate before calling

ssh host 'sh -c 'for p in "$(command -v mise)" "$HOME/.local/bin/mise" /usr/local/bin/mise; do [ -x "$p" ] && echo "$p"; done'' # ensure exactly one

Type guard

fn unambiguous(candidates: &[String]) -> bool { candidates.len() == 1 }

Try / catch

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

Prevention

When it happens

Trigger: Running a remote operation with bootstrap_command when the remote host already has multiple mise executables (e.g. one in ~/.local/bin and one in /usr/local/bin) and the bootstrap either replaced several of them or none of them, so no single new/changed/version-matching candidate exists.

Common situations: Hosts with mise installed both via the install script and via a package manager; bootstrap_command that updates all existing mise installs; stale duplicate installs after manual upgrades; multiple users' mise binaries visible in shared PATH directories.

Related errors


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

Appendix: source

Thrown at src/system/remote.rs:1416

                .and_then(|identity| identity.version.split_whitespace().next())
                .is_some_and(|version| {
                    version == env!("CARGO_PKG_VERSION")
                        || version == concat!(env!("CARGO_PKG_VERSION"), "-DEBUG")
                })
        })
        .collect::<Vec<_>>();
    if let Some(candidate) =
        select_unique_remote_mise_candidate(version_candidates, "version-matching")?
    {
        return Ok(candidate);
    }
    if let [candidate] = after {
        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<_>>()

View on GitHub (pinned to 533346cc37)