#!/bin/sh
set -eu

entire hooks git pre-push "$1" || true

# Resolve a Python interpreter that can import the project package and
# expose it via $HOOK_PYTHON. Sets PATH so `pre-commit run` underneath
# can spawn `language: system` hooks that resolve bare `python`. Fails
# fast (exit 2) with an actionable setup message if no candidate has the
# project deps — covers both the local-no-venv case and a misconfigured
# CI env. Single source of truth for interpreter choice across the entire
# hook chain.
. ./.husky/_python_path.sh

exec "$HOOK_PYTHON" scripts/run_repo_hook.py pre-push
