diff --git a/templates/pre-commit.sh b/templates/pre-commit.sh index de2fde4..27f5936 100644 --- a/templates/pre-commit.sh +++ b/templates/pre-commit.sh @@ -11,9 +11,8 @@ set -euo pipefail FAILED=0 # Verify git-crypt is initialized -if [[ ! -d ".git-crypt" ]]; then - printf "\n\033[0;31m[CRITICAL] git-crypt not initialized.\033[0m\n" - printf "Run 'git-crypt init' and 'make setup' before committing.\n" +if ! git-crypt status >/dev/null 2>&1; then + printf "\n[CRITICAL] git-crypt not initialized.\n" exit 1 fi