From 2957b27600883604449ef9adda835d3a49d18a9c Mon Sep 17 00:00:00 2001 From: robobun <117481402+robobun@users.noreply.github.com> Date: Wed, 12 Aug 2026 03:03:41 +0000 Subject: [PATCH] ci(darwin tart): export RUSTUP_HOME/CARGO_HOME in the guest job environment bootstrap.sh installs rustup into /opt/rust and exports RUSTUP_HOME and CARGO_HOME from the login profile. job.sh runs as a plain /bin/bash script, so it only had /opt/rust/bin on PATH: the rustup proxies resolved but looked for a toolchain in ~/.rustup, and every cargo invocation in a test job failed with "rustup could not choose a version of cargo to run". This made test/js/third_party/grpc-js/test-tonic.test.ts fail on every run of the darwin previous-tier (tart) lane. --- scripts/darwin-ci/guest/job.sh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/scripts/darwin-ci/guest/job.sh b/scripts/darwin-ci/guest/job.sh index 051fb3d824ac..3545ac487f10 100755 --- a/scripts/darwin-ci/guest/job.sh +++ b/scripts/darwin-ci/guest/job.sh @@ -2,6 +2,9 @@ # Runs inside the per-job guest. Expects ~/job.env (exported by the command hook) and the checkout at ~/work. set -u export PATH=/usr/local/bin:/opt/homebrew/bin:/opt/rust/bin:$PATH +# bootstrap.sh installs rustup into /opt/rust and only exports these from the login profile, which this script +# does not source; without them the proxies in /opt/rust/bin look for a toolchain in ~/.rustup and find none. +export RUSTUP_HOME=/opt/rust CARGO_HOME=/opt/rust export BUILDKITE_BUILD_CHECKOUT_PATH=$HOME/work set -a; source ~/job.env; set +a cd ~/work