We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent a0665ac commit a356fe0Copy full SHA for a356fe0
src/ci/scripts/free-disk-space.sh
@@ -1,4 +1,5 @@
1
#!/bin/bash
2
+set -x
3
# Free disk space on Linux GitHub action runners
4
5
# # ======
@@ -23,8 +24,7 @@ printSeparationLine() {
23
24
# macro to compute available space
25
# REF: https://unix.stackexchange.com/a/42049/60849
26
# REF: https://stackoverflow.com/a/450821/408734
-getAvailableSpace() { df -a "$1" | awk 'NR > 1 {avail+=$4} END {print avail}'; }
27
-
+getAvailableSpace() { echo $(df -a $1 | awk 'NR > 1 {avail+=$4} END {print avail}'); }
28
# macro to make Kb human readable (assume the input is Kb)
29
# REF: https://unix.stackexchange.com/a/44087/60849
30
formatByteCount() { numfmt --to=iec-i --suffix=B --padding=7 "$1"'000'; }
0 commit comments