fix: quote \${CLAUDE_PLUGIN_ROOT} in hookify and security-guidance hook commands

Paths containing spaces (common on Windows, e.g. C:\Users\Some User\...)
cause shell word-splitting when CLAUDE_PLUGIN_ROOT is unquoted, resulting
in hooks erroring with "No such file or directory" on every tool call.

Wraps the path in double quotes for all five affected hook commands.
Fixes the pattern reported in issue #57946. Closes the fix surfaced in PR #1921.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
Mohamed Hegazy
2026-05-19 15:37:56 -07:00
parent ae21a93679
commit b58bdbf551
2 changed files with 5 additions and 5 deletions

View File

@@ -6,7 +6,7 @@
"hooks": [
{
"type": "command",
"command": "python3 ${CLAUDE_PLUGIN_ROOT}/hooks/security_reminder_hook.py"
"command": "python3 \"${CLAUDE_PLUGIN_ROOT}/hooks/security_reminder_hook.py\""
}
],
"matcher": "Edit|Write|MultiEdit"