File tree Expand file tree Collapse file tree 1 file changed +1
-17
lines changed Expand file tree Collapse file tree 1 file changed +1
-17
lines changed Original file line number Diff line number Diff line change @@ -24,22 +24,6 @@ cd "${KUBE_ROOT}"
24
24
# Files larger than 1MB need to be allowed explicitly.
25
25
maxsize=$(( 1 * 1024 * 1024 ))
26
26
27
- run_stat () {
28
- local file=" $1 "
29
- case " $( uname -s) " in
30
- Darwin)
31
- stat -f %z " $file " | tr -d ' \n'
32
- ;;
33
- Linux)
34
- stat --printf=%s " $file "
35
- ;;
36
- * )
37
- kube::log::error " Unsupported host OS. Must be Linux or Mac OS X."
38
- exit 1
39
- ;;
40
- esac
41
- }
42
-
43
27
# Sorted list of those exceptions.
44
28
allowlist=(
45
29
staging/src/k8s.io/kubectl/images/kubectl-logo-full.png
@@ -58,7 +42,7 @@ largefiles () {
58
42
case " $tree " in
59
43
w/-text)
60
44
# Only binary files have a size limit.
61
- size=" $( run_stat " $file " ) "
45
+ size=" $( wc -c < " $file " ) "
62
46
if [ " ${size} " -gt " $maxsize " ] &&
63
47
! kube::util::array_contains " $file " " ${allowlist[@]} " ; then
64
48
echo " $file is too large ($size bytes)"
You can’t perform that action at this time.
0 commit comments