fix(hooks): locate check-messages.sh on any machine; never exit non-zero
The UserPromptSubmit hook only probed D:/claudetools and C:/claudetools, so on machines where the repo lives elsewhere (e.g. BEAST at C:/Users/guru/ClaudeTools) no candidate matched and the for-loop's final test returned 1 — surfacing a hook error on every prompt AND skipping coord-message delivery. Now try $CLAUDE_PROJECT_DIR and $HOME/ClaudeTools first (keep D:/C: for other layouts) and end with `true` so a missing script is a no-op, not an error. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -12,7 +12,7 @@
|
|||||||
"hooks": [
|
"hooks": [
|
||||||
{
|
{
|
||||||
"type": "command",
|
"type": "command",
|
||||||
"command": "bash -c 'for p in D:/claudetools C:/claudetools; do f=\"$p/.claude/scripts/check-messages.sh\"; [ -f \"$f\" ] && exec bash \"$f\"; done'",
|
"command": "bash -c 'for p in \"$CLAUDE_PROJECT_DIR\" \"$HOME/ClaudeTools\" D:/claudetools C:/claudetools; do [ -n \"$p\" ] && [ -f \"$p/.claude/scripts/check-messages.sh\" ] && exec bash \"$p/.claude/scripts/check-messages.sh\"; done; true'",
|
||||||
"timeout": 15
|
"timeout": 15
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
|||||||
Reference in New Issue
Block a user