Skip to content

Commit 78b800a

Browse files
ci: fix macOS rustup cache corruption in install-rust action
Switch back to `rustup toolchain install` (the rustup-documented way to install the toolchain pinned by rust-toolchain.toml across rustup 1.28+ versions) and disable `cache-bin` on macOS. Caching ~/.cargo/bin caused macOS jobs to fail with `error: unexpected argument 'fmt' found / Usage: rustup-init[EXE]`: rust-cache was restoring a stale cargo proxy from a runner with a different rustup version, overwriting the proxy installed in this run and leaving cargo behaving like rustup-init. Co-Authored-By: Claude <noreply@anthropic.com>
1 parent 4eac647 commit 78b800a

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

.github/actions/install-rust/action.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,13 @@ runs:
1414
steps:
1515
- name: Install rust-toolchain.toml
1616
shell: bash
17-
run: rustup show
17+
run: rustup toolchain install
1818
- name: Install additional rustup components
1919
if: inputs.components != ''
2020
shell: bash
2121
run: echo "${{ inputs.components }}" | tr ',' '\n' | xargs rustup component add
2222
- uses: Swatinem/rust-cache@c19371144df3bb44fab255c43d04cbc2ab54d1c4 # v2
2323
with:
2424
key: ${{ inputs.cache-key }}
25+
# https://github.com/Swatinem/rust-cache/issues/341
26+
cache-bin: ${{ runner.os != 'macOS' }}

0 commit comments

Comments
 (0)