Skip to content

Commit e08360b

Browse files
committed
fix: improve file removal pipeline robustness
1 parent 2b5a04d commit e08360b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

ci/dash/lint-tidy.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ if [ "${CACHE_SIZE_MB}" -gt "${CTCACHE_MAXSIZE_MB}" ]; then
6464
if [ "${CACHE_SIZE_MB}" -gt "${CTCACHE_MAXSIZE_MB}" ]; then
6565
FILE_COUNT=$(find "${CTCACHE_DIR}" -type f | wc -l)
6666
REMOVE_COUNT=$((FILE_COUNT / 5))
67-
find "${CTCACHE_DIR}" -type f -printf '%T+ %p\n' | sort | head -n "${REMOVE_COUNT}" | cut -d' ' -f2- | xargs rm -f 2>/dev/null || true
67+
find "${CTCACHE_DIR}" -type f -printf '%T+ %p\0' | sort -z | head -z -n "${REMOVE_COUNT}" | cut -z -d' ' -f2- | xargs -0 rm -f 2>/dev/null || true
6868
echo "Removed ${REMOVE_COUNT} oldest cache entries"
6969
fi
7070
echo "Cache size after cleanup: $(du -sh "${CTCACHE_DIR}" 2>/dev/null | cut -f1)"

0 commit comments

Comments
 (0)