From f41824fa59c2e06d1309af04e56844acb7501018 Mon Sep 17 00:00:00 2001 From: Alex Newman Date: Fri, 12 Dec 2025 22:28:19 -0500 Subject: [PATCH] fix: quote all CLAUDE_PLUGIN_ROOT paths in hooks.json for Windows usernames with spaces MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Wraps all ${CLAUDE_PLUGIN_ROOT} variable expansions with quotes to handle Windows paths containing spaces (e.g., C:\Users\John Doe\.claude\...). Without quotes, the shell splits the path at spaces, causing Node.js to interpret the first segment as JavaScript and throw SyntaxError: Unexpected token ':'. This fix updates the Bun migration (v7.1.0) to include proper quoting, superseding PR #212 which was based on pre-migration code. Fixes #212 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Sonnet 4.5 --- plugin/hooks/hooks.json | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/plugin/hooks/hooks.json b/plugin/hooks/hooks.json index e09c2026..6dee0255 100644 --- a/plugin/hooks/hooks.json +++ b/plugin/hooks/hooks.json @@ -7,12 +7,12 @@ "hooks": [ { "type": "command", - "command": "bun \"${CLAUDE_PLUGIN_ROOT}/scripts/smart-install.js\" && bun ${CLAUDE_PLUGIN_ROOT}/scripts/context-hook.js", + "command": "bun \"${CLAUDE_PLUGIN_ROOT}/scripts/smart-install.js\" && bun \"${CLAUDE_PLUGIN_ROOT}/scripts/context-hook.js\"", "timeout": 300 }, { "type": "command", - "command": "bun ${CLAUDE_PLUGIN_ROOT}/scripts/user-message-hook.js", + "command": "bun \"${CLAUDE_PLUGIN_ROOT}/scripts/user-message-hook.js\"", "timeout": 10 } ] @@ -23,7 +23,7 @@ "hooks": [ { "type": "command", - "command": "bun ${CLAUDE_PLUGIN_ROOT}/scripts/new-hook.js", + "command": "bun \"${CLAUDE_PLUGIN_ROOT}/scripts/new-hook.js\"", "timeout": 120 } ] @@ -35,7 +35,7 @@ "hooks": [ { "type": "command", - "command": "bun ${CLAUDE_PLUGIN_ROOT}/scripts/save-hook.js", + "command": "bun \"${CLAUDE_PLUGIN_ROOT}/scripts/save-hook.js\"", "timeout": 120 } ] @@ -46,7 +46,7 @@ "hooks": [ { "type": "command", - "command": "bun ${CLAUDE_PLUGIN_ROOT}/scripts/summary-hook.js", + "command": "bun \"${CLAUDE_PLUGIN_ROOT}/scripts/summary-hook.js\"", "timeout": 120 } ] @@ -57,7 +57,7 @@ "hooks": [ { "type": "command", - "command": "bun ${CLAUDE_PLUGIN_ROOT}/scripts/cleanup-hook.js", + "command": "bun \"${CLAUDE_PLUGIN_ROOT}/scripts/cleanup-hook.js\"", "timeout": 120 } ]