Skip to content

Commit 9277371

Browse files
authored
fix(ralph): resolve verify-hooks repo root via git (#102)
1 parent 6f4d9d1 commit 9277371

1 file changed

Lines changed: 6 additions & 3 deletions

File tree

.devagent/plugins/ralph/tools/verify-hooks-e2e.sh

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,18 @@
22
# E2E verification for --on-iteration and --on-complete: run ralph with both hooks
33
# (same script appends all payloads to one file) and verify iteration + completion payloads.
44
#
5-
# Requires (run from repo root):
5+
# Requires:
66
# - Git repo with .git and branch feature/ralph-iteration-hooks
77
# - Beads DB with epic devagent-iteration-hooks and at least one ready task
88
# - RALPH_MAX_ITERATIONS=1 is used (env override) so one iteration + completion run
9-
# Usage: from repo root: .devagent/plugins/ralph/tools/verify-hooks-e2e.sh
9+
# Usage: .devagent/plugins/ralph/tools/verify-hooks-e2e.sh
1010

1111
set -e
1212
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
13-
REPO_ROOT="$(cd "${SCRIPT_DIR}/../../../../.." && pwd)"
13+
if ! REPO_ROOT="$(git -C "${SCRIPT_DIR}/../../../../.." rev-parse --show-toplevel 2>/dev/null)"; then
14+
echo "Error: Unable to resolve repo root from ${SCRIPT_DIR}" >&2
15+
exit 1
16+
fi
1417
cd "$REPO_ROOT"
1518

1619
OUT_FILE="$(mktemp)"

0 commit comments

Comments
 (0)