mirror of
https://github.com/fancive/obsidian-parallel-reader.git
synced 2026-07-22 06:53:43 +00:00
22 lines
361 B
Bash
Executable file
22 lines
361 B
Bash
Executable file
#!/usr/bin/env bash
|
|
set -euo pipefail
|
|
|
|
[ "${STOP_HOOK_ACTIVE:-}" = "true" ] && exit 0
|
|
export STOP_HOOK_ACTIVE=true
|
|
|
|
OUT="$(mktemp)"
|
|
set +e
|
|
bash .e2e/gate.sh --json >"$OUT"
|
|
CODE=$?
|
|
set -e
|
|
|
|
if [ "$CODE" -ne 0 ]; then
|
|
cat "$OUT" >&2
|
|
rm -f "$OUT"
|
|
echo '{"decision":"block","reason":"e2e contract gate failed"}'
|
|
exit 2
|
|
fi
|
|
|
|
cat "$OUT" >&2
|
|
rm -f "$OUT"
|
|
exit 0
|