Commit 3d8f5dd
committed
fix(hooks): align pre-push .env detection with pre-commit/commit-msg
The pre-push hook used a narrow regex (/^\.env(\.local)?$/) that only
matched root-level .env and .env.local files. Meanwhile pre-commit and
commit-msg use basename() with a broader pattern that catches .env files
at any depth and with any suffix (excluding example/test/precommit).
Since pre-push is the mandatory enforcement layer that catches things
bypassed via --no-verify, it must be at least as strict. Use the same
basename()-based detection pattern from the other hooks.1 parent cc065a7 commit 3d8f5dd
1 file changed
Lines changed: 10 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
17 | 17 | | |
18 | 18 | | |
19 | 19 | | |
| 20 | + | |
20 | 21 | | |
21 | 22 | | |
22 | 23 | | |
| |||
190 | 191 | | |
191 | 192 | | |
192 | 193 | | |
193 | | - | |
194 | | - | |
| 194 | + | |
| 195 | + | |
| 196 | + | |
| 197 | + | |
| 198 | + | |
| 199 | + | |
| 200 | + | |
| 201 | + | |
| 202 | + | |
195 | 203 | | |
196 | 204 | | |
197 | 205 | | |
| |||
0 commit comments