mirror of
https://github.com/actions-rust-lang/setup-rust-toolchain.git
synced 2025-07-04 12:31:11 +00:00
Tweak sparse registry version regex and command not found
These issues are reported again rust-toolchain from which the code is inspired. https://github.com/dtolnay/rust-toolchain/issues/71 https://github.com/dtolnay/rust-toolchain/pull/69#pullrequestreview-1299712112
This commit is contained in:
parent
c7c759a5c9
commit
2d7b97c05c
2 changed files with 10 additions and 1 deletions
|
@ -131,8 +131,10 @@ runs:
|
|||
- name: "Enable cargo sparse registry on stable"
|
||||
run: |
|
||||
# except on 1.66 and 1.67, on which it is unstable
|
||||
# Not all 1.68.0-nightly versions support it either
|
||||
# https://github.com/dtolnay/rust-toolchain/pull/69#discussion_r1107268108
|
||||
if [[ ! -v CARGO_REGISTRIES_CRATES_IO_PROTOCOL ]]; then
|
||||
if echo "${{steps.versions.outputs.rustc-version}}" | not grep -q '^rustc 1\.6[67]\.'; then
|
||||
if echo "${{steps.versions.outputs.rustc-version}}" | grep --invert --quiet '^rustc \(1\.6[67]\.\|1\.68\.0-nightly\)'; then
|
||||
echo "CARGO_REGISTRIES_CRATES_IO_PROTOCOL=sparse" >> $GITHUB_ENV
|
||||
fi
|
||||
fi
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue