From 7aad6c034c763cc637c5f03c624ae262a8c58d73 Mon Sep 17 00:00:00 2001 From: Mikolaj Konarski Date: Wed, 8 Feb 2023 11:11:37 +0100 Subject: [PATCH] Try sudo only on (new) Linux, where it should be available --- .github/workflows/validate.yml | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/.github/workflows/validate.yml b/.github/workflows/validate.yml index 72e471dbd6a..74cfab9c3b0 100644 --- a/.github/workflows/validate.yml +++ b/.github/workflows/validate.yml @@ -59,9 +59,10 @@ jobs: - name: Sudo chmod to permit ghcup to update its cache run: | - sudo mkdir -p /usr/local/.ghcup/cache - sudo chmod -R g+wr /usr/local/.ghcup/cache - + if [[ "${{ runner.os }}" == "Linux" ]]; then + sudo mkdir -p /usr/local/.ghcup/cache + sudo chmod -R g+wr /usr/local/.ghcup/cache + fi - uses: haskell/actions/setup@v2 id: setup-haskell with: