diff --git a/.husky/pre-commit b/.husky/pre-commit index 3d69a84..53e20b0 100644 --- a/.husky/pre-commit +++ b/.husky/pre-commit @@ -1,4 +1,14 @@ #!/bin/sh . "$(dirname "$0")/_/husky.sh" -pnpm run --filter=./apps/www build:registry && pnpm prettier +echo "Running pre-commit hook..." +if ! pnpm run --filter=./apps/www build:registry; then + echo "Error: Failed to build registry. Commit aborted." + exit 1 +fi +echo "Registry built successfully. Running Prettier..." +if ! pnpm prettier; then + echo "Error: Prettier formatting failed. Commit aborted." + exit 1 +fi +echo "Pre-commit hook completed successfully."