jdx/mise · error
rustup show profile failed for {}: {}
Error message
rustup show profile failed for {}: {} What it means
Before reading the default rustup profile, mise runs `rustup show profile` with rustup-specific env and requires the command to exit successfully. If the process exits non-zero, the error propagates rustup's trimmed stderr so the user can see why rustup failed (missing toolchain, broken install, corrupted settings).
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 afd2eddd3a)
Solutions
- Run `rustup show profile` manually and fix the underlying rustup error reported in stderr.
- Reinstall or repair rustup (`rustup self update`, or reinstall from rustup.rs).
- Verify RUSTUP_HOME/CARGO_HOME point to a valid, readable rustup installation; unset conflicting overrides in mise config.
- Ensure a default toolchain exists (`rustup toolchain install stable && rustup default stable`).
Example fix
// before: broken RUSTUP_HOME override in mise.toml [env] RUSTUP_HOME = "/nonexistent" // after: remove the override or point at the real rustup home [env] # RUSTUP_HOME removed — use system default
Defensive patterns
Strategy: try-catch
Validate before calling
let ok = std::process::Command::new("rustup").args(["show", "profile"]).output().map(|o| o.status.success());
if !ok.unwrap_or(false) { eprintln!("rustup is broken or missing; run `rustup show profile` to diagnose"); } Try / catch
match result {
Err(e) if e.to_string().contains("rustup show profile failed") => {
eprintln!("repair rustup first: {}", e);
// run `rustup show profile` manually / reinstall rustup
}
...
} Prevention
- Keep rustup up to date with `rustup self update`.
- Avoid overriding RUSTUP_HOME/CARGO_HOME in mise [env] unless intentional.
- Ensure a default toolchain is installed before using mise's rust plugin.
- In CI, install rustup before running mise install for rust.
When it happens
Trigger: Called from is_install_satisfied or install_version_ via rustup_default_profile when `rustup show profile` exits non-zero: rustup not properly installed, RUSTUP_HOME corrupted, toolchain config unreadable, or rustup env (homes/version) pointing at a broken install.
Common situations: rustup partially uninstalled or home directory moved; RUSTUP_HOME/CARGO_HOME env conflicts; running inside a sandbox/CI container where rustup's settings.toml is missing or unwritable; a rustup update in progress.
Related errors
- rustup show profile returned an empty profile for {}
- command ["rustup", "check"] exited with code {}. stderr: {}
- rustc identity command failed: {}
- {display_program} {display_args} failed: exit code {} {}
- git -C {} {} failed: {}
AI-assisted analysis of jdx/mise@afd2eddd3a (2026-09-09).
Data as JSON: /api/errors/e66124b9311cb218.
Report an issue: GitHub.