jdx/mise · error

mise executable not found after bootstrap_command

Error message

mise executable not found after bootstrap_command

What it means

In `select_bootstrapped_mise` (src/system/remote.rs), after running a user-provided `bootstrap_command` on a remote host, mise snapshots the PATH of mise executables before and after. If the 'after' snapshot is completely empty — no mise binary exists anywhere on the remote PATH — this error is thrown because there is nothing to select as the remote mise executable.

Source

Thrown at src/system/remote.rs:1412

                .get(*candidate)
                .and_then(Option::as_ref)
                .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()

View on GitHub (pinned to afd2eddd3a)

Solutions

  1. Set `remote_mise` (or `mise_bin`) explicitly to the absolute path of the mise executable on the remote host so bootstrap discovery is skipped.
  2. Run the bootstrap_command manually on the remote host and verify a mise binary actually exists (`which mise`).
  3. Fix the bootstrap_command so it installs mise into a directory on the remote non-interactive PATH (e.g. /usr/local/bin).
  4. Check SSH PATH for the login used — non-login SSH sessions often omit ~/.local/bin; add an export in the bootstrap script.

Example fix

// before
bootstrap_command = "curl -fsSL https://mise.run | sh"
// after
remote_mise = "~/.local/bin/mise"
# or make the bootstrap place it on a known PATH:
# bootstrap_command = "curl -fsSL https://mise.run | MISE_INSTALL_PATH=/usr/local/bin/mise sh"
Defensive patterns

Strategy: validation

Validate before calling

# shell (run before/instead of bootstrap)
command -v mise || { curl -fsSL https://mise.run | MISE_INSTALL_PATH=/usr/local/bin/mise sh; }

Prevention

When it happens

Trigger: Calling the remote-provisioning path (auto-installing mise on a remote host over SSH) where `bootstrap_command` runs successfully but installs nothing findable on PATH: the bootstrap script exits 0 without installing mise, installs to a location outside the searched PATH, or the PATH lookup returns no candidates at all.

Common situations: A bootstrap_command that silently fails (e.g. `curl ... | sh` piped output suppressed yet download failed), a script that installs mise for a different user's home (~/.local/bin not on the SSH non-login PATH), or a typo'd install URL yielding an empty directory.

Understand the failure class

Background: "File not found" and ENOENT errors: why libraries can't find a file that should exist — this error's family across 50 libraries.

Related errors


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