From fea439dc14022e347906e2bca0776bf5ab7d41ec Mon Sep 17 00:00:00 2001 From: mukunda katta Date: Tue, 14 Apr 2026 23:04:28 -0700 Subject: [PATCH] Fix: quote ${CLAUDE_PLUGIN_ROOT} so hooks work on paths with spaces Both SessionStart and UserPromptSubmit hook commands passed ${CLAUDE_PLUGIN_ROOT} unquoted, so the shell split the expansion on whitespace whenever a user's plugin root contained a space (e.g. /Users/Tyler Laprade/...). Node received a truncated path and errored with "Cannot find module '/Users/Tyler'", preventing the plugin from loading. Wrapping the variable in double quotes keeps the path intact on any POSIX-style shell and has no effect on paths without spaces. Fixes #157 --- .claude-plugin/plugin.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.claude-plugin/plugin.json b/.claude-plugin/plugin.json index 960c95b..63f8502 100644 --- a/.claude-plugin/plugin.json +++ b/.claude-plugin/plugin.json @@ -11,7 +11,7 @@ "hooks": [ { "type": "command", - "command": "node ${CLAUDE_PLUGIN_ROOT}/hooks/caveman-activate.js", + "command": "node \"${CLAUDE_PLUGIN_ROOT}/hooks/caveman-activate.js\"", "timeout": 5, "statusMessage": "Loading caveman mode..." } @@ -23,7 +23,7 @@ "hooks": [ { "type": "command", - "command": "node ${CLAUDE_PLUGIN_ROOT}/hooks/caveman-mode-tracker.js", + "command": "node \"${CLAUDE_PLUGIN_ROOT}/hooks/caveman-mode-tracker.js\"", "timeout": 5, "statusMessage": "Tracking caveman mode..." }