jdx/mise · error

rustup show profile returned an empty profile for {}

Error message

rustup show profile returned an empty profile for {}

What it means

After `rustup show profile` exits successfully, mise trims stdout and requires a non-empty profile name. An empty output means rustup succeeded but returned nothing parseable, so mise cannot determine the default profile and refuses to continue rather than guessing.

Source

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

        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],
        installed: &BTreeSet<String>,
    ) -> Vec<String> {
        requested
            .iter()
            .filter(|component| !rustup_component_installed(installed, component))
            .cloned()
            .collect()
    }

View on GitHub (pinned to afd2eddd3a)

Solutions

  1. Update rustup (`rustup self update`) to a version that supports `show profile`.
  2. Run `rustup show profile` manually; if empty, set a default toolchain (`rustup default stable`).
  3. Check for rustup shims/wrappers on PATH that may swallow stdout and bypass them.
  4. Reinstall rustup cleanly if the installation is corrupted.

Example fix

// before: ancient rustup
$ rustup show profile
(empty output)
// after
$ rustup self update
$ rustup show profile
default
Defensive patterns

Strategy: validation

Validate before calling

let out = std::process::Command::new("rustup").args(["show", "profile"]).output()?;
let profile = String::from_utf8_lossy(&out.stdout).trim().to_string();
if profile.is_empty() {
    eprintln!("rustup too old or misconfigured; run `rustup self update` and `rustup default stable`");
}

Prevention

When it happens

Trigger: Called from is_install_satisfied or install_version_ via rustup_default_profile when `rustup show profile` exits 0 but prints no profile — typically a rustup version too old to support `show profile`, or output redirected/swallowed by a rustup shim/wrapper that emits nothing.

Common situations: Very old rustup versions predating `rustup show profile`; a wrapper script or shim intercepting rustup and dropping stdout; rustup configured with no default toolchain in a way that prints empty output.

Related errors


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