File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed
Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -154,8 +154,9 @@ while read local_ref local_sha remote_ref remote_sha; do
154154 file_text=$( cat " $file " 2> /dev/null)
155155 fi
156156
157- # Hardcoded personal paths (/Users/foo/, /home/foo/, C:\Users\foo\).
158- if echo " $file_text " | grep -qE ' (/Users/[^/\s]+/|/home/[^/\s]+/|C:\\Users\\[^\\]+\\)' ; then
157+ # Hardcoded personal paths (/Users/foo/, /home/foo/, C:\\Users\\foo\\).
158+ # Skip binary files — compiled binaries contain build-machine paths.
159+ if [ " $is_binary " = false ] && echo " $file_text " | grep -qE ' (/Users/[^/\s]+/|/home/[^/\s]+/|C:\\Users\\[^\\]+\\)' ; then
159160 printf " ${RED} ✗ BLOCKED: Hardcoded personal path found in: %s${NC} \n" " $file "
160161 echo " $file_text " | grep -nE ' (/Users/[^/\s]+/|/home/[^/\s]+/|C:\\Users\\[^\\]+\\)' | head -3
161162 ERRORS=$(( ERRORS + 1 ))
You can’t perform that action at this time.
0 commit comments