From 59b4c24cab44af155af3b3af0254e4e4fa55df46 Mon Sep 17 00:00:00 2001 From: hotungchang Date: Wed, 14 Oct 2026 16:06:34 +0800 Subject: [PATCH] fix(hooks): quote ${CLAUDE_PLUGIN_ROOT} in hook commands When the plugin is installed under a path containing spaces (common on Windows, e.g. C:\Users\First Last\.claude\...), the shell split the unquoted path and node received only the first fragment, so every hook failed with MODULE_NOT_FOUND on each event. Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_01YYpHr4VNP2fCe3H1Bq1Ffw --- hooks/hooks.json | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/hooks/hooks.json b/hooks/hooks.json index d1c932f8..62d2430e 100644 --- a/hooks/hooks.json +++ b/hooks/hooks.json @@ -7,7 +7,7 @@ "hooks": [ { "type": "command", - "command": "node ${CLAUDE_PLUGIN_ROOT}/hooks/security-guard.js", + "command": "node \"${CLAUDE_PLUGIN_ROOT}/hooks/security-guard.js\"", "timeout": 5 } ] @@ -19,7 +19,7 @@ "hooks": [ { "type": "command", - "command": "node ${CLAUDE_PLUGIN_ROOT}/hooks/session-summary.js", + "command": "node \"${CLAUDE_PLUGIN_ROOT}/hooks/session-summary.js\"", "timeout": 15 } ] @@ -31,7 +31,7 @@ "hooks": [ { "type": "command", - "command": "node ${CLAUDE_PLUGIN_ROOT}/hooks/session-start.js", + "command": "node \"${CLAUDE_PLUGIN_ROOT}/hooks/session-start.js\"", "timeout": 10 } ] @@ -43,7 +43,7 @@ "hooks": [ { "type": "command", - "command": "node ${CLAUDE_PLUGIN_ROOT}/hooks/stop-summary.js", + "command": "node \"${CLAUDE_PLUGIN_ROOT}/hooks/stop-summary.js\"", "timeout": 10 } ] @@ -55,7 +55,7 @@ "hooks": [ { "type": "command", - "command": "node ${CLAUDE_PLUGIN_ROOT}/hooks/skill-forced-eval.js", + "command": "node \"${CLAUDE_PLUGIN_ROOT}/hooks/skill-forced-eval.js\"", "timeout": 10 } ]