#!/bin/sh
# Code Guardian – Git Pre-Push Hook
# This file is installed automatically via `npm run setup-hooks`.
#
# It runs the Node.js checker before every git push.
# If errors are found, the push is BLOCKED (exit 1).

CHECKER="D:/MEET/EXT/code-guardian/git-hooks/checkPush.js"

if [ ! -f "$CHECKER" ]; then
  echo ""
  echo "⚠️  Code Guardian: checkPush.js not found at $CHECKER"
  echo "   Skipping pre-push check."
  echo ""
  exit 0
fi

node "$CHECKER"
exit $?
