From 85fafed4b7da6f74cc75d163a64ec0409b164ed2 Mon Sep 17 00:00:00 2001 From: Nitesh Singh Date: Wed, 13 Aug 2025 21:57:56 +0530 Subject: [PATCH] feat: update helper message when trufflehog not found on system --- .husky/pre-commit | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.husky/pre-commit b/.husky/pre-commit index 7a891170..1ef10e0d 100644 --- a/.husky/pre-commit +++ b/.husky/pre-commit @@ -8,5 +8,11 @@ git update-index --again # check for secrets if [ -z "$CI" ] && [ -z "$GITHUB_ACTIONS" ]; then + if ! command -v trufflehog >/dev/null 2>&1; then + echo "trufflehog' is not installed or not in your PATH." + echo "Download it from: https://github.com/trufflesecurity/trufflehog" + echo "Skipping secrets check due to missing trufflehog." + exit 1 + fi trufflehog git file://. --since-commit HEAD --fail fi