jdx/mise · error

rustup show profile failed for

Error message

rustup show profile failed for {}: {}

What it means

When resolving the default rustup profile for a Rust tool version, mise runs `rustup show` with rustup-managed environment variables and treats a non-zero exit as fatal, embedding rustup's stderr. This guards install-satisfaction checks and installs against a broken or misbehaving rustup toolchain manager.

Solutions

  1. Run `rustup show` manually with the same environment to see the underlying stderr and fix rustup
  2. Repair or reinstall rustup (`rustup self update`, or re-run rustup-init)
  3. Check that RUSTUP_HOME/CARGO_HOME used by mise's rustup_env point to valid, complete directories
Defensive patterns

Strategy: try-catch

Validate before calling

const { execSync } = require('child_process');
try { execSync('rustup show', { stdio: 'pipe' }); } catch { console.error('rustup is broken; repair before mise install'); }

Try / catch

try { await miseInstall('rust', version); } catch (e) { if (String(e).includes('rustup show profile failed')) { console.error('Run `rustup show` manually and repair rustup:', e.message); } else throw e; }

Prevention

When it happens

Trigger: Calling install_version_ or is_install_satisfied for a rust tool version when the spawned `rustup show profile` command exits non-zero — e.g. rustup not functioning, a broken RUSTUP_HOME, corrupt toolchain metadata, or rustup emitting an error to stderr.

Common situations: Corrupt or partial rustup installation in RUSTUP_HOME; incompatible rustup version; environment variables pointing at a stale rustup home; rustup update in progress or failed mid-upgrade leaving bad state.

Related errors


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

Appendix: source

Thrown at src/plugins/core/rust.rs:273

                .map(String::from)
                .collect(),
        ))
    }

    /// Returns the profile rustup applies when an install omits `--profile`.
    fn rustup_default_profile(&self, tv: &ToolVersion, runtime: &RustRuntime) -> Result<String> {
        let args = vec!["show".to_string(), "profile".to_string()];
        let mut cmd = cmd(runtime.bin_dir.join(RUSTUP_BIN), args)
            .env("PATH", rustup_path_env(runtime)?)
            .stdout_capture()
            .stderr_capture()
            .unchecked();
        for (key, value) in rustup_env(&runtime.homes, &tv.version) {
            cmd = cmd.env(key, value);
        }
        let output = cmd.run()?;
        if !output.status.success() {
            bail!(
                "rustup show profile failed for {}: {}",
                tv.style(),
                String::from_utf8_lossy(&output.stderr).trim()
            );
        }
        let profile = String::from_utf8_lossy(&output.stdout).trim().to_string();
        if profile.is_empty() {
            bail!(
                "rustup show profile returned an empty profile for {}",
                tv.style()
            );
        }
        Ok(profile)
    }

    fn missing_components(
        &self,
        requested: &[String],

View on GitHub (pinned to 533346cc37)