fix(hooks): pass augment pattern after end-of-options marker

Prevent grep/glob patterns that begin with '--' from being parsed as CLI flags.

Apply the '--' separator across Claude and Cursor hook call sites (direct binary and npx fallback paths).
This commit is contained in:
Linus Beckhaus 2026-03-06 21:11:38 +01:00
parent 7376e92063
commit 930fa09d4d
2 changed files with 2 additions and 2 deletions

View file

@ -37,7 +37,7 @@ if [ -z "$PATTERN" ] || [ ${#PATTERN} -lt 3 ]; then
fi
# Run gitnexus augment
RESULT=$(npx -y gitnexus augment "$PATTERN" 2>/dev/null)
RESULT=$(npx -y gitnexus augment -- "$PATTERN" 2>/dev/null)
if [ -n "$RESULT" ]; then
# Escape for JSON

View file

@ -64,7 +64,7 @@ fi
# Run gitnexus augment — must be fast (<500ms target)
# augment writes to stderr (KuzuDB captures stdout at OS level), so capture stderr and discard stdout
RESULT=$(cd "$CWD" && npx -y gitnexus augment "$PATTERN" 2>&1 1>/dev/null)
RESULT=$(cd "$CWD" && npx -y gitnexus augment -- "$PATTERN" 2>&1 1>/dev/null)
if [ -n "$RESULT" ]; then
ESCAPED=$(echo "$RESULT" | jq -Rs .)