fix: quote ${CLAUDE_PLUGIN_ROOT} in hook commands#13
Open
aidevenanzio-prog wants to merge 1 commit into
Open
Conversation
Unquoted ${CLAUDE_PLUGIN_ROOT} word-splits in POSIX-shell hook
runners whenever the path contains a space (e.g. Windows user
profile dirs like 'C:\Users\First Last\'). node then receives a
truncated path as its entry module and throws MODULE_NOT_FOUND
from the cjs loader on every PreCompact/SessionStart/SubagentStart/
UserPromptSubmit hook invocation.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
All four hook commands in hooks/hooks.json interpolate ${CLAUDE_PLUGIN_ROOT} unquoted. When the install path contains a space (e.g. Windows profile dirs like C:\Users\First Last), the POSIX-shell hook runner word-splits the path, node receives a truncated entry path, and every PreCompact/SessionStart/SubagentStart/UserPromptSubmit hook throws MODULE_NOT_FOUND from the cjs loader. Fix: wrap ${CLAUDE_PLUGIN_ROOT} in double quotes in each command string, matching the pattern other Claude Code plugins already use.