mirror of
https://github.com/abhigyanpatwari/GitNexus.git
synced 2026-09-07 08:26:11 +00:00
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:
parent
7376e92063
commit
930fa09d4d
2 changed files with 2 additions and 2 deletions
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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 .)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue