We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent a696021 commit b91b8e9Copy full SHA for b91b8e9
1 file changed
.claude/hooks/pre-commit.sh
@@ -4,6 +4,10 @@
4
5
set -uo pipefail
6
7
+HOOK_INPUT=$(cat)
8
+SESSION_ID=$(printf '%s' "$HOOK_INPUT" | jq -r '.session_id // ""')
9
+FLAG_FILE="/tmp/claude-tests-confirmed${SESSION_ID:+-$SESSION_ID}"
10
+
11
cd "$CLAUDE_PROJECT_DIR"
12
13
STAGED=$(git diff --cached --name-only)
@@ -12,9 +16,6 @@ if [ -z "$STAGED" ]; then
16
exit 0
17
fi
14
18
15
-SESSION_ID="${CLAUDE_CODE_SESSION_ID:-${CLAUDE_SESSION_ID:-}}"
-FLAG_FILE="/tmp/claude-tests-confirmed${SESSION_ID:+-$SESSION_ID}"
-
19
ERRORS=""
20
21
# --- Format check ---
0 commit comments