mirror of
https://github.com/affaan-m/everything-claude-code.git
synced 2026-05-15 13:23:13 +08:00
fix: salvage remaining stale queue fixes (#1754)
This commit is contained in:
@@ -12,8 +12,20 @@
|
||||
|
||||
set -e
|
||||
|
||||
# Hook phase from CLI argument: "pre" (PreToolUse) or "post" (PostToolUse)
|
||||
HOOK_PHASE="${1:-post}"
|
||||
# Hook phase from CLI argument: "pre" (PreToolUse) or "post" (PostToolUse).
|
||||
# Manual settings.json installs can call this script without the plugin
|
||||
# wrapper's positional phase argument, but Claude Code still exposes the hook
|
||||
# event name in CLAUDE_HOOK_EVENT_NAME. Fall back to that env var before
|
||||
# defaulting to post so manually registered PreToolUse hooks are recorded as
|
||||
# tool_start instead of being silently misclassified as tool_complete.
|
||||
HOOK_PHASE="${1:-}"
|
||||
if [ -z "$HOOK_PHASE" ]; then
|
||||
case "${CLAUDE_HOOK_EVENT_NAME:-}" in
|
||||
PreToolUse|pretooluse|pre_tool_use|pre) HOOK_PHASE="pre" ;;
|
||||
PostToolUse|posttooluse|post_tool_use|post) HOOK_PHASE="post" ;;
|
||||
*) HOOK_PHASE="post" ;;
|
||||
esac
|
||||
fi
|
||||
|
||||
# ─────────────────────────────────────────────
|
||||
# Read stdin first (before project detection)
|
||||
|
||||
Reference in New Issue
Block a user