We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 5c8bbed commit b8f709eCopy full SHA for b8f709e
2 files changed
.claude/hooks/block-manglings.sh
@@ -0,0 +1,12 @@
1
+#!/bin/bash
2
+
3
+FILE_PATH=$(jq -r '.tool_input.file_path' < /dev/stdin)
4
5
+case "$FILE_PATH" in
6
+ */Resources/manglings*)
7
+ echo "BLOCKED: test resource file" >&2
8
+ exit 2
9
+ ;;
10
+esac
11
12
+exit 0
.claude/settings.json
@@ -3,13 +3,23 @@
"PostToolUse": [
{
"matcher": "Edit|Write",
- "command": "swift build 2>&1 | tail -20"
+ "hooks": [
+ {
+ "type": "command",
+ "command": "swift build 2>&1 | tail -20"
+ }
+ ]
}
13
],
14
"PreToolUse": [
15
16
- "command": "case \"$CLAUDE_FILE_PATH\" in */Resources/manglings*) echo 'BLOCKED: test resource file'; exit 1;; esac"
17
18
19
20
+ "command": ".claude/hooks/block-manglings.sh"
21
22
23
24
]
25
0 commit comments