From 7d56d5214e90a18ce404274feaa3793438b69426 Mon Sep 17 00:00:00 2001 From: Casey Rodarmor Date: Sun, 1 Dec 2024 14:54:28 -0800 Subject: [PATCH] [bin/forbid] Improve error message if ripgrep is missing (#2493) --- bin/forbid | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/bin/forbid b/bin/forbid index 538c780c0d..8638e832c4 100755 --- a/bin/forbid +++ b/bin/forbid @@ -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 \