Files
gh-jwplatta-prompt-library-…/hooks/prevent-env-commit.json
2025-11-30 08:30:02 +08:00

7 lines
216 B
JSON

{
"event": "PreToolUse",
"tool": "Bash",
"pattern": "*git add*",
"command": "bash -c 'if echo \"$TOOL_INPUT\" | grep -q \"\\.env\"; then echo \"Blocked: .env files should not be committed\" && exit 1; fi'"
}