Skip to content

Commit 7aad6c0

Browse files
committed
Try sudo only on (new) Linux, where it should be available
1 parent a198c2b commit 7aad6c0

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

.github/workflows/validate.yml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -59,9 +59,10 @@ jobs:
5959

6060
- name: Sudo chmod to permit ghcup to update its cache
6161
run: |
62-
sudo mkdir -p /usr/local/.ghcup/cache
63-
sudo chmod -R g+wr /usr/local/.ghcup/cache
64-
62+
if [[ "${{ runner.os }}" == "Linux" ]]; then
63+
sudo mkdir -p /usr/local/.ghcup/cache
64+
sudo chmod -R g+wr /usr/local/.ghcup/cache
65+
fi
6566
- uses: haskell/actions/setup@v2
6667
id: setup-haskell
6768
with:

0 commit comments

Comments
 (0)