From 34adc04c7df48b14862a4dd19dcbe05ea95ad543 Mon Sep 17 00:00:00 2001 From: xj Date: Sun, 1 Mar 2026 09:58:52 -0800 Subject: [PATCH] fix(ci): self-heal when cargo is missing from rust toolchain --- scripts/ci/self_heal_rust_toolchain.sh | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/scripts/ci/self_heal_rust_toolchain.sh b/scripts/ci/self_heal_rust_toolchain.sh index 27b71167f..91763e861 100755 --- a/scripts/ci/self_heal_rust_toolchain.sh +++ b/scripts/ci/self_heal_rust_toolchain.sh @@ -11,12 +11,12 @@ if ! command -v rustup >/dev/null 2>&1; then exit 0 fi -if rustc "+${TOOLCHAIN}" --version >/dev/null 2>&1; then - echo "Rust toolchain ${TOOLCHAIN} is healthy." +if rustc "+${TOOLCHAIN}" --version >/dev/null 2>&1 && cargo "+${TOOLCHAIN}" --version >/dev/null 2>&1; then + echo "Rust toolchain ${TOOLCHAIN} is healthy (rustc + cargo present)." exit 0 fi -echo "Rust toolchain ${TOOLCHAIN} appears unhealthy; removing cached installs." +echo "Rust toolchain ${TOOLCHAIN} appears unhealthy (missing rustc/cargo); removing cached installs." for candidate in \ "${TOOLCHAIN}" \ "${TOOLCHAIN}-x86_64-apple-darwin" \ @@ -26,4 +26,3 @@ for candidate in \ do rustup toolchain uninstall "${candidate}" >/dev/null 2>&1 || true done -