diff --git a/hack/verify-file-sizes.sh b/hack/verify-file-sizes.sh index 97a10ed0030..29894f2c1f7 100755 --- a/hack/verify-file-sizes.sh +++ b/hack/verify-file-sizes.sh @@ -42,7 +42,7 @@ largefiles () { case "$tree" in w/-text) # Only binary files have a size limit. - size="$(stat --printf=%s "$file")" + size="$(wc -c < "$file")" if [ "${size}" -gt "$maxsize" ] && ! kube::util::array_contains "$file" "${allowlist[@]}"; then echo "$file is too large ($size bytes)"