Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
fix: restore personal path detection for binary files
  • Loading branch information
jdalton committed Apr 15, 2026
commit 49da2db9b1022b2c8abafb8a34e3a5466d3bd45a
3 changes: 1 addition & 2 deletions .git-hooks/pre-push
Original file line number Diff line number Diff line change
Expand Up @@ -155,8 +155,7 @@ while read local_ref local_sha remote_ref remote_sha; do
fi

# Hardcoded personal paths (/Users/foo/, /home/foo/, C:\\Users\\foo\\).
# Skip binary files — compiled binaries contain build-machine paths.
if [ "$is_binary" = false ] && echo "$file_text" | grep -qE '(/Users/[^/\s]+/|/home/[^/\s]+/|C:\\Users\\[^\\]+\\)'; then
if echo "$file_text" | grep -qE '(/Users/[^/\s]+/|/home/[^/\s]+/|C:\\Users\\[^\\]+\\)'; then
printf "${RED}✗ BLOCKED: Hardcoded personal path found in: %s${NC}\n" "$file"
echo "$file_text" | grep -nE '(/Users/[^/\s]+/|/home/[^/\s]+/|C:\\Users\\[^\\]+\\)' | head -3
ERRORS=$((ERRORS + 1))
Expand Down