[bin/forbid] Improve error message if ripgrep is missing (#2493)

This commit is contained in:
Casey Rodarmor 2024-12-01 14:54:28 -08:00 committed by GitHub
parent beaec7ef7c
commit 7d56d5214e
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -1,8 +1,12 @@
#!/usr/bin/env bash
set -euxo pipefail
set -euo pipefail
if ! which rg > /dev/null; then
echo 'error: `rg` not found, please install ripgrep: https://github.com/BurntSushi/ripgrep/'
exit 1
fi
which rg
! rg \
--glob !bin/forbid \