From 138ed95c4e2e42a0e232a7065aef25e0565fe821 Mon Sep 17 00:00:00 2001
From: David Tolnay <dtolnay@gmail.com>
Date: Sun, 12 Feb 2023 13:04:46 -0800
Subject: [PATCH] Tweak sparse registry conditional

---
 action.yml | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/action.yml b/action.yml
index 3f81fee..481bb8d 100644
--- a/action.yml
+++ b/action.yml
@@ -100,10 +100,10 @@ runs:
     - run: |
         : enable Cargo sparse registry
         # except on 1.66 and 1.67, on which it is unstable
-        if [ -z ${CARGO_REGISTRIES_CRATES_IO_PROTOCOL+set} ] \
-          && ! rustc +${{steps.parse.outputs.toolchain}} --version --verbose | grep -q '^release: 1\.6[67]\.'
-        then
-          echo CARGO_REGISTRIES_CRATES_IO_PROTOCOL=sparse >> $GITHUB_ENV
+        if [ -z ${CARGO_REGISTRIES_CRATES_IO_PROTOCOL+set} ]; then
+          if rustc +${{steps.parse.outputs.toolchain}} --version --verbose | not grep -q '^release: 1\.6[67]\.'; then
+            echo CARGO_REGISTRIES_CRATES_IO_PROTOCOL=sparse >> $GITHUB_ENV
+          fi
         fi
       shell: bash