development #117
@@ -78,3 +78,8 @@ main() {
|
||||
}
|
||||
|
||||
main "$@"
|
||||
|
||||
# Clear plugin cache to ensure fresh hooks are loaded
|
||||
echo "Clearing plugin cache..."
|
||||
rm -rf ~/.claude/plugins/cache/leo-claude-mktplace/
|
||||
echo "Cache cleared"
|
||||
|
||||
44
scripts/verify-hooks.sh
Executable file
44
scripts/verify-hooks.sh
Executable file
@@ -0,0 +1,44 @@
|
||||
#!/bin/bash
|
||||
# Verify all hooks are command type (not prompt)
|
||||
# Run this after any plugin update
|
||||
|
||||
echo "=== HOOK VERIFICATION ==="
|
||||
echo ""
|
||||
|
||||
FAILED=0
|
||||
|
||||
# Check ALL hooks.json files in .claude directory
|
||||
for f in $(find ~/.claude -name "hooks.json" 2>/dev/null); do
|
||||
if grep -q '"type": "prompt"' "$f" || grep -q '"type":"prompt"' "$f"; then
|
||||
echo "❌ PROMPT HOOK FOUND: $f"
|
||||
FAILED=1
|
||||
fi
|
||||
done
|
||||
|
||||
# Check cache specifically
|
||||
if [ -d ~/.claude/plugins/cache/leo-claude-mktplace ]; then
|
||||
echo "❌ CACHE EXISTS: ~/.claude/plugins/cache/leo-claude-mktplace"
|
||||
echo " Run: rm -rf ~/.claude/plugins/cache/leo-claude-mktplace/"
|
||||
FAILED=1
|
||||
fi
|
||||
|
||||
# Verify installed hooks are command type
|
||||
for plugin in doc-guardian code-sentinel projman pr-review project-hygiene; do
|
||||
HOOK_FILE=~/.claude/plugins/marketplaces/leo-claude-mktplace/plugins/$plugin/hooks/hooks.json
|
||||
if [ -f "$HOOK_FILE" ]; then
|
||||
if grep -q '"type": "command"' "$HOOK_FILE" || grep -q '"type":"command"' "$HOOK_FILE"; then
|
||||
echo "✓ $plugin: command type"
|
||||
else
|
||||
echo "❌ $plugin: NOT command type"
|
||||
FAILED=1
|
||||
fi
|
||||
fi
|
||||
done
|
||||
|
||||
echo ""
|
||||
if [ $FAILED -eq 0 ]; then
|
||||
echo "✓ All hooks verified OK"
|
||||
else
|
||||
echo "❌ ISSUES FOUND - fix before using"
|
||||
exit 1
|
||||
fi
|
||||
Reference in New Issue
Block a user