Skip to content

Commit 785525d

Browse files
authored
Merge pull request #66 from dtolnay/sparseregistry
Set CARGO_REGISTRIES_CRATES_IO_PROTOCOL
2 parents dd1a82b + de1aa37 commit 785525d

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

action.yml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -98,9 +98,11 @@ runs:
9898
shell: bash
9999
100100
- run: |
101-
: enable Cargo sparse registry # ignored by stable cargo
102-
if [ -z ${CARGO_UNSTABLE_SPARSE_REGISTRY+set} ]; then
103-
echo CARGO_UNSTABLE_SPARSE_REGISTRY=true >> $GITHUB_ENV
101+
: enable Cargo sparse registry # except on 1.66 and 1.67, on which it is unstable
102+
if [ -z ${CARGO_REGISTRIES_CRATES_IO_PROTOCOL+set} ] \
103+
&& ! rustc +${{steps.parse.outputs.toolchain}} --version --verbose | grep -q '^release: 1\.6[67]\.'
104+
then
105+
echo CARGO_REGISTRIES_CRATES_IO_PROTOCOL=sparse >> $GITHUB_ENV
104106
fi
105107
shell: bash
106108

0 commit comments

Comments
 (0)