mirror of
https://github.com/Sea-Haven-Industries/engineering-handbook.git
synced 2026-09-30 10:23:13 +00:00
Some checks are pending
ci / ci / ci (push) Waiting to run
docs: align engineering conventions for Cursor migration (PLAT-62)
18 lines
707 B
Bash
Executable file
18 lines
707 B
Bash
Executable file
#!/usr/bin/env bash
|
|
# pre-push shim for repos that set core.hooksPath.
|
|
#
|
|
# Setting core.hooksPath in a repo replaces the machine-global hooks directory
|
|
# entirely. Without this shim the workstation security pre-push gate is silently
|
|
# disabled. This file re-execs the global hook so the gate stays active.
|
|
#
|
|
# Install: used automatically when a repo's core.hooksPath points to a tracked
|
|
# hooks directory containing this file.
|
|
|
|
GLOBAL="${SH_GLOBAL_HOOKS:-$HOME/.config/git/hooks}/pre-push"
|
|
if [ ! -x "$GLOBAL" ]; then
|
|
echo "pre-push: global security hook is missing or not executable: $GLOBAL" >&2
|
|
echo "Repair the security-review hook installation before pushing." >&2
|
|
exit 1
|
|
fi
|
|
|
|
exec "$GLOBAL" "$@"
|