Files
gstack/hosts/codex/hooks/codex-skill-contract-stop-hook
T
24b15c6823 Windows hooks start under unconverted paths, and six more setup and install fixes from outside reports (#4682)
Seven install and setup bugs reported by outside contributors are fixed,
each with a test that fails on main: Windows hooks under an apostrophe
home or with path conversion off, two misleading `./setup --status`
rows, owner-only files in Bun's shared cache, a leftover
`/connect-chrome` alias, a doctor false alarm, and harness installs
ignoring `disabled_skills`.

Nothing to do after merge; the next `./setup` or upgrade picks it up.

Co-authored-by: Arnuv <69417158+abyss-node@users.noreply.github.com>
Co-authored-by: Mahmoud ElNeMR <83190847+ElNeMeR70@users.noreply.github.com>
Co-authored-by: Yuan S. <3579304+szsunyuan@users.noreply.github.com>
Co-authored-by: Alexander William Haire <141470777+alexanderhaire@users.noreply.github.com>
Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
Review-Finding: p1v/outside-voice#1 reader=outside-voice
Review-Finding: p1v/outside-voice#3 reader=outside-voice
2026-11-22 10:31:18 +00:00

13 lines
867 B
Bash
Executable File

#!/usr/bin/env bash
# Bash shim for Codex: Codex runs hook commands through a login shell, so this
# wrapper makes the TypeScript hook executable via bun. ${CODEX_HOME}/hooks.json
# references it through the Codex runtime root (${CODEX_HOME}/skills/gstack,
# whose hosts/codex/hooks links here), so pwd -P finds the checkout.
#
# 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 -P)" || exit 0
case "${OSTYPE:-}" in msys*|cygwin*) if command -v cygpath >/dev/null 2>&1; then HERE="$(cygpath -m "$HERE")"; fi ;; esac
GSTACK_HOOK_HOST=codex bun --no-env-file --config="${GSTACK_BUN_CONFIG:-/dev/null}" "$HERE/codex-skill-contract-stop-hook.ts" || true
exit 0