diff --git a/.github/workflows/pytest.yaml b/.github/workflows/pytest.yaml index 547b1c3dfa..7391443f43 100644 --- a/.github/workflows/pytest.yaml +++ b/.github/workflows/pytest.yaml @@ -113,7 +113,7 @@ jobs: - name: Force recreation of pre-commit virtual environment for mypy if: github.event_name == 'schedule' # Comment this line to run on a PR - run: gh cache delete $(gh cache list -L 999 | cut -f2 | grep pre-commit) + run: gh cache list -L 999 | cut -f2 | grep pre-commit | xargs -I{} 'gh cache delete "{}" || true' env: { GH_TOKEN: "${{ github.token }}" } - uses: pre-commit/action@v3.0.0