#!/bin/sh
# Fast pre-commit wrapper for Signal Fish Server.
# Keep this file tiny: Git executes extensionless hooks directly, and this
# wrapper delegates cross-platform policy logic to PowerShell.

set -eu

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

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