chore: use git ls-files instead of find to list files (#4425)

Signed-off-by: Will Murphy <willmurphyscode@users.noreply.github.com>
This commit is contained in:
Will Murphy 2025-12-01 16:46:42 -05:00 committed by GitHub
parent e556ceb4a8
commit d37ed567a8
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -24,7 +24,7 @@ while IFS= read -r -d '' file; do
echo "File $file is greater than ${size} bytes."
found_large_files=1
fi
done < <(find "$directory" -type f -print0)
done < <(git ls-files -z "$directory")
if [ "$found_large_files" -eq 1 ]; then
echo "Script failed: Some files are greater than ${size} bytes."