Repository navigation
fix: run Claude Code hooks from a plugin path with a space - #91
Merged
Merged
Conversation
Merged
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.
Fixes #90.
On macOS lich keeps the plugin under
~/Library/Application Support.hooks/hooks.jsonexpanded${CLAUDE_PLUGIN_ROOT}unquoted, so/bin/shsplit it at the space and every hook exited 127. The card got no state, title or touched files. Only the Stop hook showed the error.hooks/hooks.jsonquotes the script path, ashooks/codex-hooks.jsonalready did.hooks/crush-hooks.jsonquotes the<lich-plugin>placeholder. A clone path with a space broke in the same way.tests/hooks.test.mjsruns every registration under a plugin root with a space in it (a symlink to the checkout at<tmp>/Application Support). Before the fix, the 11 Claude Code registrations and the 2 Crush ones exited 127 with the error from the issue. The registration's argument is now read off the unexpanded command, so the space in the root does not split it.Patch: nothing sent that lich's contract did not already accept.
node --test tests/*.test.mjs: 452 pass.claude plugin validatepasses; its two warnings (root CLAUDE.md, no icon) were already there. Not run on a real macOS install.