fix(hooks): double-quote CLAUDE_PLUGIN_ROOT in hook commands #2
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "fix/hooks-quoting-claude-plugin-root"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Problem
Claude Code meldete bei jedem Tool-Call:
Alle drei Hooks (PostToolUse, Stop, SessionStart) waren tot — Auto-Compile, Session-Start usw. liefen nicht.
Ursache
In
hooks/hooks.jsonwaren die Pfade mit single quotes umschlossen:Bash expandiert Variablen in single quotes nicht, also wurde der wörtliche String
${CLAUDE_PLUGIN_ROOT}/hooks/post-tool-use.shan bash übergeben → "Datei nicht gefunden".Fix
Single quotes → double quotes (escaped), analog zu anderen Plugins wie
ralph-loop:Test
python3 -m json.tool)Single quotes prevented bash from expanding ${CLAUDE_PLUGIN_ROOT}, causing 'Datei oder Verzeichnis nicht gefunden' for all three hooks (PostToolUse, Stop, SessionStart).View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.Merge
Merge the changes and update on Forgejo.Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.