Skip to content

Commit 72cef62

Browse files
feat: update helper message when trufflehog not found on system (#332)
1 parent 1d5f4bd commit 72cef62

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

.husky/pre-commit

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,5 +8,11 @@ git update-index --again
88

99
# check for secrets
1010
if [ -z "$CI" ] && [ -z "$GITHUB_ACTIONS" ]; then
11+
if ! command -v trufflehog >/dev/null 2>&1; then
12+
echo "trufflehog' is not installed or not in your PATH."
13+
echo "Download it from: https://github.com/trufflesecurity/trufflehog"
14+
echo "Skipping secrets check due to missing trufflehog."
15+
exit 1
16+
fi
1117
trufflehog git file://. --since-commit HEAD --fail
1218
fi

0 commit comments

Comments
 (0)