#!/bin/sh branch="$(git branch --show-current)" if [ "$branch" = "main" ]; then echo "Direct commits to main branch are not allowed." exit 1 fi . "$(dirname "$0")/_/husky.sh" if [ `git config --get-all secrets.patterns | wc -l` == 0 ]; then echo "Git secrets are not configured. To configure please follow instructions here: https://github.com/awslabs/git-secrets." exit 1 fi npx --no-install lint-staged git-secrets --scan