#!/bin/sh
# Fast pre-push wrapper for Signal Fish Server.
# Keep expensive semantic checks in agent workflows, local CI, and GitHub CI.

set -eu

if command -v pwsh >/dev/null 2>&1; then
    exec pwsh -NoLogo -NoProfile -NonInteractive -ExecutionPolicy Bypass \
        -File scripts/hooks/pre-push.ps1 "$@"
fi

echo "[pre-push] ERROR: PowerShell 7+ (pwsh) is required for Signal Fish hooks." >&2
echo "[pre-push] Install from: https://learn.microsoft.com/powershell/scripting/install/installing-powershell" >&2
exit 1
