#!/usr/bin/env bash
# Bash shim for one Claude Code hook event of the /plan-ceo-review gate
# (GST-1461): Claude Code runs hook commands through /bin/sh, so this wrapper
# runs hosts/claude/hooks/ceo-review-gate.ts with bun. Registered by
# ./setup --ceo-review-gate for Stop; one basename per event so the
# KNOWN_HOOKS identity table keeps one event per row.
#
# FAIL-OPEN: every failure path (bun missing, script crash) still exits 0.
GSTACK_BUN_CONFIG=/dev/null; case "${OSTYPE:-}" in msys*|cygwin*) if command -v cygpath >/dev/null 2>&1; then GSTACK_BUN_CONFIG=NUL; fi ;; esac
HERE="$(cd "$(dirname "$0")" && pwd)" || exit 0
bun --no-env-file --config="${GSTACK_BUN_CONFIG:-/dev/null}" "$HERE/ceo-review-gate.ts" || true
exit 0
