Repository navigation
Commit 058ad4e
committed
fix: Use POSIX redirect in pre-commit gitleaks guard
`&> /dev/null` is a bashism. Husky runs hooks under `/bin/sh`, so on
systems where that is dash the guard parsed as a backgrounded
`command -v gitleaks &` followed by a bare `> /dev/null` redirection,
whose exit status is always 0. That made the `if` always true, so
`gitleaks protect` ran even when gitleaks was not installed and the
warning branch was unreachable.
This was failing on CI with Linux runners.1 parent 95f0fa6 commit 058ad4e
1 file changed
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | | - | |
| 2 | + | |
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
| |||
0 commit comments