Skip to content

Commit 9cc3879

Browse files
committed
ci: check if we got the proper paths
1 parent 78ac013 commit 9cc3879

File tree

1 file changed

+11
-5
lines changed
  • .github/actions/free-disk-space

1 file changed

+11
-5
lines changed

.github/actions/free-disk-space/free.sh

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,6 @@ set -euo pipefail
55
df -h
66

77
to_delete=(
8-
"/lib/firefox"
9-
"/lib/google-cloud-sdk"
10-
"/lib/jvm"
11-
"/lib/llvm-16"
12-
"/lib/llvm-17"
138
"/opt/az"
149
"/opt/google"
1510
"/opt/hostedtoolcache/CodeQL"
@@ -19,6 +14,11 @@ to_delete=(
1914
"/opt/hostedtoolcache/node"
2015
"/opt/microsoft"
2116
"/opt/pipx"
17+
"/usr/lib/firefox"
18+
"/usr/lib/google-cloud-sdk"
19+
"/usr/lib/jvm"
20+
"/usr/lib/llvm-16"
21+
"/usr/lib/llvm-17"
2222
"/usr/local/.ghcup"
2323
"/usr/local/lib/android"
2424
"/usr/share/swift"
@@ -37,6 +37,12 @@ for d in "${to_delete[@]}"; do
3737
exit 1
3838
fi
3939

40+
r="$(realpath "$d")"
41+
if [ "$d" != "$r" ]; then
42+
echo "not a canonical path, use this instead: $r"
43+
exit 1
44+
fi
45+
4046
sudo rm -rf "$d"
4147
done
4248

0 commit comments

Comments
 (0)