Commit 10e6d48
committed
fix(hooks): align pre-commit.mts .env detection with commit-msg.mts (basename-based)
Bugbot flagged: pre-commit.mts tested the full path against /^\.env/
(catching only root-level), while commit-msg.mts uses basename()
(catching .env at any depth). A nested packages/cli/.env.local
should be blocked at commit time, not just root .env. Aligned both
to basename-based matching, and added .env.precommit to pre-commit's
allowlist so it matches commit-msg's allowlist.1 parent 30f02d5 commit 10e6d48
1 file changed
Lines changed: 12 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
| 11 | + | |
11 | 12 | | |
12 | 13 | | |
13 | 14 | | |
| |||
62 | 63 | | |
63 | 64 | | |
64 | 65 | | |
65 | | - | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
66 | 70 | | |
67 | | - | |
68 | | - | |
69 | | - | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
70 | 78 | | |
71 | 79 | | |
72 | 80 | | |
| |||
0 commit comments