mirror of
https://github.com/anthropics/claude-plugins-official.git
synced 2026-04-17 21:22:42 +00:00
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.
16 lines
323 B
JSON
16 lines
323 B
JSON
{
|
|
"description": "Explanatory mode hook that adds educational insights instructions",
|
|
"hooks": {
|
|
"SessionStart": [
|
|
{
|
|
"hooks": [
|
|
{
|
|
"type": "command",
|
|
"command": "bash \"${CLAUDE_PLUGIN_ROOT}/hooks-handlers/session-start.sh\""
|
|
}
|
|
]
|
|
}
|
|
]
|
|
}
|
|
}
|