Skip to content

Commit 88b3781

Browse files
committed
try with rsync rather than rm -rf
1 parent 9eff073 commit 88b3781

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

.github/actions/clear-files/action.yml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,6 @@ runs:
99
DEBIAN_FRONTEND: noninteractive
1010
run: |
1111
set +e
12-
exec > >(awk '{ print strftime("[%Y-%m-%d %H:%M:%S]"), $0 }') \
13-
2> >(awk '{ print strftime("[%Y-%m-%d %H:%M:%S]"), $0 }' >&2)
1412
1513
# Skip slow "updating man-db" dpkg step
1614
echo 'set man-db/auto-update false' | sudo debconf-communicate; sudo dpkg-reconfigure man-db
@@ -34,12 +32,15 @@ runs:
3432
"/usr/local/lib/node_modules"
3533
)
3634
35+
mkdir empty_dir
3736
for dir in "${DIRS_TO_REMOVE[@]}"; do
3837
if [ -d "$dir" ]; then
3938
echo "Removing $dir"
40-
time sudo rm -Rf "$dir"
39+
du -sh "$dir"
40+
time rsync -a --delete empty_dir/ "$dir"
4141
fi
4242
done
43+
rmdir empty_dir
4344
4445
echo "Disabling swap"
4546
sudo swapoff -a

0 commit comments

Comments
 (0)