Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make pre-commit hook script POSIX compliant (close #1246) #1247

Merged
merged 1 commit into from
Oct 12, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions common/git-hooks/pre-commit
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ ERROR_COLOR='\033[0;31m'
WARNING_COLOR='\033[0;33m'
STOP_COLOR='\033[0m'

if ! command -v gitleaks &> /dev/null
if ! command -v gitleaks > /dev/null 2>&1
then
echo "${ERROR_COLOR}\nGitleaks not found. To commit you safely, you need to install it per the instructions at https://github.com/gitleaks/gitleaks.${STOP_COLOR}"
exit 1
Expand All @@ -21,4 +21,4 @@ then
echo "${WARNING_COLOR}\nGitleaks skipped for this commit.${STOP_COLOR}"
else
gitleaks protect -v --staged --report-path ./findings.json
fi
fi
Loading