Repository navigation
chore: resolve post-edit hook path via CLAUDE_PROJECT_DIR - #2362
rahmanunver wants to merge 2 commits into
Conversation
The hook command was a repo-root-relative path, so it only resolved when the shell's working directory happened to be the repo root. Widget work follows docs/widget-scripts.md and runs from inside the package directory, where the path does not exist and the auto-format hook silently stops running (it fails non-blocking, so the loss is easy to miss).
This comment has been minimized.
This comment has been minimized.
AI Code Review
What was reviewed
Skipped (out of scope): All CI checks — not available in this run (checks approval was declined). Findings
|
The
PostToolUsehook command was a repo-root-relative path, so it only resolved when the shell's working directory happened to be the repo root.Widget work follows
docs/widget-scripts.mdand runs from inside the package directory, where that path does not exist. The hook fails non-blocking, so the auto-format silently stops running and the loss is easy to miss.$CLAUDE_PROJECT_DIRis set to the project root, so the path resolves regardless of working directory. Behaviour at the repo root is unchanged.