From ac0bbc31c584c1564e5de215cbc1cc469576f9cc Mon Sep 17 00:00:00 2001 From: Leandro Lucarella Date: Thu, 2 Jan 2025 15:23:17 +0100 Subject: [PATCH] Fix resetting pip cache ownership in CI We only need to do this when the cache directory exists, otherwise the step fails with an error. Signed-off-by: Leandro Lucarella --- .github/workflows/ci.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index aaecb7a94..42f9ea839 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -198,7 +198,7 @@ jobs: # This ensures that the runner has access to the pip cache. - name: Reset pip cache ownership if: always() - run: sudo chown -R $USER:$USER /tmp/pip-cache + run: if [[ -e /tmp/pip-cache ]]; then sudo chown -R $USER:$USER /tmp/pip-cache; fi # This job runs if all the `nox-cross-arch` matrix jobs ran and succeeded. # As the `nox-all` job, its main purpose is to provide a single point of