File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 6767 with :
6868 targets : ${{ matrix.target }}
6969
70+ - name : Verify cargo resolves to rustup proxy (macOS shim workaround)
71+ if : runner.os == 'macOS'
72+ shell : bash
73+ run : |
74+ # macOS runners (most often `macos-14` ARM, but also observed on
75+ # `macos-latest`/aarch64 builds — see #1136) intermittently expose
76+ # a stale `cargo` on PATH that resolves to `rustup-init`, breaking
77+ # `cargo metadata` invocations from napi-rs. Force the rustup
78+ # proxy bin dir to the front of PATH and fail fast if cargo is
79+ # unhealthy. Applied to all macOS matrix entries as a safety net.
80+ echo "$HOME/.cargo/bin" >> "$GITHUB_PATH"
81+ "$HOME/.cargo/bin/cargo" --version
82+ "$HOME/.cargo/bin/rustc" --version
83+
7084 - name : Rust cache
7185 uses : Swatinem/rust-cache@v2
7286 with :
Original file line number Diff line number Diff line change @@ -176,6 +176,20 @@ jobs:
176176 with :
177177 targets : ${{ matrix.target }}
178178
179+ - name : Verify cargo resolves to rustup proxy (macOS shim workaround)
180+ if : runner.os == 'macOS'
181+ shell : bash
182+ run : |
183+ # macOS runners (most often `macos-14` ARM, but also observed on
184+ # `macos-latest`/aarch64 builds — see #1136) intermittently expose
185+ # a stale `cargo` on PATH that resolves to `rustup-init`, breaking
186+ # `cargo metadata` invocations from napi-rs. Force the rustup
187+ # proxy bin dir to the front of PATH and fail fast if cargo is
188+ # unhealthy. Applied to all macOS matrix entries as a safety net.
189+ echo "$HOME/.cargo/bin" >> "$GITHUB_PATH"
190+ "$HOME/.cargo/bin/cargo" --version
191+ "$HOME/.cargo/bin/rustc" --version
192+
179193 - name : Rust cache
180194 uses : Swatinem/rust-cache@v2
181195 with :
You can’t perform that action at this time.
0 commit comments