mirror of
https://github.com/garrytan/gstack.git
synced 2026-12-04 13:55:29 +01:00
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
18 lines
1.0 KiB
Bash
Executable File
18 lines
1.0 KiB
Bash
Executable File
#!/usr/bin/env bash
|
|
# Native Read barrier. A broken install must return deny JSON, never silence.
|
|
set -euo pipefail
|
|
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
|
|
_AUTOPLAN_DECIDED=''
|
|
_autoplan_backstop() {
|
|
if [ -z "$_AUTOPLAN_DECIDED" ]; then
|
|
printf '%s\n' '{"hookSpecificOutput":{"hookEventName":"PreToolUse","permissionDecision":"deny","permissionDecisionReason":"[autoplan] Publication hook unavailable. Restore the gstack installation and retry."}}'
|
|
fi
|
|
}
|
|
trap _autoplan_backstop EXIT
|
|
_AUTOPLAN_HOOK_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd -P)"
|
|
case "${OSTYPE:-}" in msys*|cygwin*) if command -v cygpath >/dev/null 2>&1; then _AUTOPLAN_HOOK_DIR="$(cygpath -m "$_AUTOPLAN_HOOK_DIR")"; fi ;; esac
|
|
_AUTOPLAN_RESULT="$(bun --no-env-file --config="${GSTACK_BUN_CONFIG:-/dev/null}" "$_AUTOPLAN_HOOK_DIR/phase-publication-hook.ts")"
|
|
test -n "$_AUTOPLAN_RESULT"
|
|
printf '%s\n' "$_AUTOPLAN_RESULT"
|
|
_AUTOPLAN_DECIDED=1
|