Skip to content

Commit 677d8d3

Browse files
committed
fix: restore personal path detection for binary files
1 parent 4e29098 commit 677d8d3

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

.git-hooks/pre-push

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -155,8 +155,7 @@ while read local_ref local_sha remote_ref remote_sha; do
155155
fi
156156

157157
# 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
158+
if echo "$file_text" | grep -qE '(/Users/[^/\s]+/|/home/[^/\s]+/|C:\\Users\\[^\\]+\\)'; then
160159
printf "${RED}✗ BLOCKED: Hardcoded personal path found in: %s${NC}\n" "$file"
161160
echo "$file_text" | grep -nE '(/Users/[^/\s]+/|/home/[^/\s]+/|C:\\Users\\[^\\]+\\)' | head -3
162161
ERRORS=$((ERRORS + 1))

0 commit comments

Comments
 (0)