mirror of
https://github.com/anthropics/claude-plugins-official.git
synced 2026-05-11 05:55:53 -03:00
fix: invoke .sh hooks via bash prefix; add version for cache invalidation
Fixes #993 (Permission denied on hook scripts) without relying on client-side +x preservation. The hook executor spawns commands via /bin/sh -c, which requires +x to execute a script directly. Prefixing with bash reads the script as data — mode bits are irrelevant. This works on all Claude Code versions, whereas the client-side chmod fix (claude-cli #24666) only shipped in v2.1.86. All 3 scripts declare #!/bin/bash and use bashisms ([[ ]], =~), so bash (not sh) is the correct interpreter. The version field forces a fresh cache path (1.0.0/ instead of unknown/), ensuring the new hooks.json reaches users with stale caches.
This commit is contained in:
parent
548bfa8375
commit
986deab6a1
@ -1,5 +1,6 @@
|
||||
{
|
||||
"name": "explanatory-output-style",
|
||||
"version": "1.0.0",
|
||||
"description": "Adds educational insights about implementation choices and codebase patterns (mimics the deprecated Explanatory output style)",
|
||||
"author": {
|
||||
"name": "Anthropic",
|
||||
|
||||
@ -6,7 +6,7 @@
|
||||
"hooks": [
|
||||
{
|
||||
"type": "command",
|
||||
"command": "${CLAUDE_PLUGIN_ROOT}/hooks-handlers/session-start.sh"
|
||||
"command": "bash \"${CLAUDE_PLUGIN_ROOT}/hooks-handlers/session-start.sh\""
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
@ -1,5 +1,6 @@
|
||||
{
|
||||
"name": "learning-output-style",
|
||||
"version": "1.0.0",
|
||||
"description": "Interactive learning mode that requests meaningful code contributions at decision points (mimics the unshipped Learning output style)",
|
||||
"author": {
|
||||
"name": "Anthropic",
|
||||
|
||||
@ -6,7 +6,7 @@
|
||||
"hooks": [
|
||||
{
|
||||
"type": "command",
|
||||
"command": "${CLAUDE_PLUGIN_ROOT}/hooks-handlers/session-start.sh"
|
||||
"command": "bash \"${CLAUDE_PLUGIN_ROOT}/hooks-handlers/session-start.sh\""
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
@ -1,5 +1,6 @@
|
||||
{
|
||||
"name": "ralph-loop",
|
||||
"version": "1.0.0",
|
||||
"description": "Continuous self-referential AI loops for interactive iterative development, implementing the Ralph Wiggum technique. Run Claude in a while-true loop with the same prompt until task completion.",
|
||||
"author": {
|
||||
"name": "Anthropic",
|
||||
|
||||
@ -6,7 +6,7 @@
|
||||
"hooks": [
|
||||
{
|
||||
"type": "command",
|
||||
"command": "${CLAUDE_PLUGIN_ROOT}/hooks/stop-hook.sh"
|
||||
"command": "bash \"${CLAUDE_PLUGIN_ROOT}/hooks/stop-hook.sh\""
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user