From 28e1103cc04799b0ceff868510ba84f0859f30c9 Mon Sep 17 00:00:00 2001 From: onur-ozkan Date: Thu, 5 Jun 2025 07:10:25 +0300 Subject: [PATCH] don't panic for incompatible download-rustc options outside of CI env Signed-off-by: onur-ozkan --- src/bootstrap/src/core/config/config.rs | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/bootstrap/src/core/config/config.rs b/src/bootstrap/src/core/config/config.rs index 03044d4fc804a..a9ed0eab6eefd 100644 --- a/src/bootstrap/src/core/config/config.rs +++ b/src/bootstrap/src/core/config/config.rs @@ -2823,7 +2823,14 @@ impl Config { return None; } - res.unwrap(); + // On CI, avoid using download-rustc if the configuration differs from the one used to build download-rustc. + // We typically use `DISABLE_CI_RUSTC_IF_INCOMPATIBLE` to skip download-rustc in such cases. + if CiEnv::is_ci() { + res.unwrap(); + } else if let Err(err) = res { + // For non-CI environments, print the error instead of panicking. + eprintln!("{err}"); + } } Some(commit.clone())