From 997d839ca41b7a6fc46f3fba722476e6558688ab Mon Sep 17 00:00:00 2001 From: Craig Jennings Date: Wed, 13 May 2026 13:48:56 -0500 Subject: fix: scope validate-el.sh hook to in-project files The PostToolUse hook tried to byte-compile every .el file edited, including ones outside the chime project. Out-of-project files typically require packages that aren't on the hook's -L paths, so validation failed for unrelated reasons. Exit 0 when the edited file isn't under $PROJECT_ROOT. --- .claude/hooks/validate-el.sh | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/.claude/hooks/validate-el.sh b/.claude/hooks/validate-el.sh index 0c3a46c..db1770b 100755 --- a/.claude/hooks/validate-el.sh +++ b/.claude/hooks/validate-el.sh @@ -35,6 +35,13 @@ f="$(jq -r '.tool_input.file_path // .tool_response.filePath // empty')" [ -z "$f" ] && exit 0 [ "${f##*.}" = "el" ] || exit 0 +# Skip files outside the project — the hook's -L paths only cover this repo, +# so byte-compiling another project's .el will fail on its own requires. +case "$f" in + "$PROJECT_ROOT"/*) ;; + *) exit 0 ;; +esac + MAX_AUTO_TEST_FILES=20 # skip if more matches than this (large test suites) # --- Phase 1: syntax + byte-compile --- -- cgit v1.2.3