jdx/mise · error

mise is installed via a package manager, cannot update

Error message

mise is installed via a package manager, cannot update

What it means

`mise self-update` refuses when the install is marked as package-manager-owned. is_available() returns false when MISE_SELF_UPDATE_DISABLED_PATH (marker file shipped by Homebrew and the AUR mise-bin package) or MISE_SELF_UPDATE_INSTRUCTIONS is set, or MISE_SELF_UPDATE_AVAILABLE=false. mise first warns with the packager's instructions (if any) then bails — unless --force is passed, which bypasses the guard.

Source

Thrown at src/cli/self_update.rs:202

        .encode_wide()
        .last()
        .is_some_and(|c| c == u16::from(b'\\') || c == u16::from(b'/'))
}

/// The file stem `self-replace` would put in the helper's name: the running executable's.
#[cfg(windows)]
fn current_exe_stem() -> Option<String> {
    let exe = std::env::current_exe().ok()?;
    exe.file_stem().and_then(|s| s.to_str()).map(str::to_owned)
}

impl SelfUpdate {
    pub async fn run(self) -> Result<()> {
        if !Self::is_available() && !self.force {
            if let Some(instructions) = upgrade_instructions_text() {
                warn!("{}", instructions);
            }
            bail!("mise is installed via a package manager, cannot update");
        }
        #[cfg(windows)]
        Self::ensure_temp_dir_can_replace_binary()?;
        // Before the update, not after: this run is about to create a copy of its own, and that one
        // is in use rather than stale.
        #[cfg(windows)]
        sweep_helper_orphans();
        let status = self.do_update()?;

        if status.updated() {
            let version = status.version().to_string();
            let styled_version = style(&version).bright().yellow();
            miseprintln!("Updated mise to {styled_version}");
            // On Windows, "exe"/"hardlink" shims are copies of mise-shim.exe and
            // go stale after an update. Refresh mise-shim.exe, and ONLY if that
            // succeeds rebuild the shim copies from it. Reshimming on failure
            // would re-copy the OLD mise-shim.exe yet still stamp the new version
            // in the `.version` marker, masking the staleness from future

View on GitHub (pinned to 9dcfcaa0dc)

Solutions

  1. Update through the owning package manager (e.g. `brew upgrade mise`, `paru -Syu mise-bin`)
  2. Switch to the self-updating official install: curl script from mise.jdx.dev, then `mise self-update` works
  3. Only if you accept overwriting the packaged binary: `mise self-update --force` (package DB will disagree with the binary afterwards)

Example fix

# before
mise self-update        # Homebrew install -> bail
# after
brew upgrade mise       # or reinstall via the official curl script
Defensive patterns

Strategy: validation

Validate before calling

# bash: detect a package-managed install before attempting self-update
if [ -n "${MISE_SELF_UPDATE_INSTRUCTIONS:-}${MISE_SELF_UPDATE_DISABLED_PATH:-}" ] \
   || [ "${MISE_SELF_UPDATE_AVAILABLE:-}" = "false" ]; then
  echo "self-update unavailable; use the owning package manager" >&2
  exit 2
fi
mise self-update

Prevention

When it happens

Trigger: `mise self-update` on a Homebrew/AUR/apt-managed install, or in any environment where the packager set MISE_SELF_UPDATE_INSTRUCTIONS/DISABLED_PATH, or MISE_SELF_UPDATE_AVAILABLE=false was exported.

Common situations: brew users running self-update out of habit and getting a brew-specific instruction block; corporate images that pin mise via a package manager; MISE_SELF_UPDATE_AVAILABLE exported in a dotfile.

Related errors


AI-assisted analysis of jdx/mise@9dcfcaa0dc (2026-08-17). Data as JSON: /api/errors/bc2cb7ac5e54ff97. Report an issue: GitHub.