hooks 338 B

12345678910111213141516171819
  1. #!/bin/sh
  2. if [ ! -d ".git" ]; then
  3. exit 0
  4. fi
  5. mkdir -p .git/hooks
  6. cat > .git/hooks/pre-push << 'EOF'
  7. #!/bin/sh
  8. # Ensure dependencies are installed before typecheck
  9. if command -v bun >/dev/null 2>&1; then
  10. bun install >/dev/null 2>&1 || true
  11. fi
  12. bun run typecheck
  13. EOF
  14. chmod +x .git/hooks/pre-push
  15. echo "✅ Pre-push hook installed"