jdx/mise · error
command ["rustup", "check"] exited with code {}. stderr: {}
Error message
command ["rustup", "check"] exited with code {}. stderr: {} What it means
In outdated_info, mise runs `rustup check` unchecked because exit code 100 means 'updates available', not failure. Any other non-zero exit code (and any unknown/null exit code, treated as -1) is a real failure and is wrapped in this error along with rustup's trimmed stderr.
Source
Thrown at src/plugins/core/rust.rs:649
let v_re = regex!(r#"Update available : (.*) -> (.*)"#);
if regex!(r"(\d+)\.(\d+)\.(\d+)").is_match(&tv.version) {
let oi = OutdatedInfo::resolve(config, tv.clone(), bump, opts).await?;
Ok(oi)
} else {
let ts = config.get_toolset().await?;
let runtime = RustRuntime::resolve_recorded_for_tool_version(config, tv).await?;
let mut cmd = cmd(runtime.bin_dir.join(RUSTUP_BIN), ["check"])
.env("PATH", self.path_env_for_cmd(config, tv).await?);
for (k, v) in self.exec_env(config, ts, tv).await? {
cmd = cmd.env(k, v);
}
// rustup check returns exit code 100 when updates are available
// This is not an error, so we use unchecked() and check status manually
let result = cmd.stdout_capture().stderr_capture().unchecked().run()?;
let exit_code = result.status.code().unwrap_or(-1);
if exit_code != 0 && exit_code != 100 {
let stderr = String::from_utf8_lossy(&result.stderr);
eyre::bail!(
"command [\"rustup\", \"check\"] exited with code {}. stderr: {}",
exit_code,
stderr.trim()
);
}
let out = String::from_utf8_lossy(&result.stdout);
for line in out.lines() {
if line.starts_with(&self.target_triple(tv))
&& let Some(_cap) = v_re.captures(line)
{
// let requested = cap.get(1).unwrap().as_str().to_string();
// let latest = cap.get(2).unwrap().as_str().to_string();
let oi = OutdatedInfo::new(config, tv.clone(), tv.version.clone())?;
return Ok(Some(oi));
}
}
Ok(None)
}View on GitHub (pinned to afd2eddd3a)
Solutions
- Read the stderr in the message and run `rustup check` manually to reproduce the failure.
- Fix network/proxy access to rust's release servers (set HTTPS_PROXY or allowlist static.rust-lang.org).
- Repair or reinstall rustup (`rustup self update`, or fresh install).
- Ensure the `rustup` on PATH is the real rustup, not a shim returning unexpected exit codes.
Example fix
// before: offline CI $ mise outdated command ["rustup", "check"] exited with code 1. stderr: error: could not download... // after: configure proxy in CI export HTTPS_PROXY=http://proxy.internal:8080 $ mise outdated
Defensive patterns
Strategy: try-catch
Validate before calling
match std::process::Command::new("rustup").arg("check").output() {
Ok(o) if o.status.code().map_or(true, |c| c != 0 && c != 100) => {
eprintln!("rustup check unhealthy: {}", String::from_utf8_lossy(&o.stderr));
}
_ => {}
} Try / catch
match outcome {
Err(e) if e.to_string().contains("command [\"rustup\", \"check\"]") => {
eprintln!("fix rustup/network before checking outdated rust: {}", e);
// check connectivity to static.rust-lang.org, reinstall rustup
}
...
} Prevention
- Ensure CI has network/proxy access to static.rust-lang.org.
- Run `rustup check` in your environment before `mise outdated` to catch breakage early.
- Keep rustup healthy with periodic `rustup self update`.
- Don't shadow the real rustup binary with shims returning odd exit codes.
When it happens
Trigger: Running `mise outdated` / version-check paths for rust when `rustup check` exits with a code other than 0 or 100: rustup binary missing/broken, network failure reaching the release server, corrupted RUSTUP_HOME, or rustup killed by a signal (null exit code → -1).
Common situations: Offline CI runners where rustup check cannot reach static.rust-lang.org; broken rustup installs; proxy/firewall blocking rustup's telemetry; a non-rustup `rustup` shim on PATH that exits with an unexpected code.
Related errors
- rustup show profile failed for {}: {}
- rustup show profile returned an empty profile for {}
- rustc identity command failed: {}
- git command failed with {status}
- bootstrap from repository failed with {status}
AI-assisted analysis of jdx/mise@afd2eddd3a (2026-09-09).
Data as JSON: /api/errors/1176721d5d7692ed.
Report an issue: GitHub.