Skip to content

Commit

Permalink
feat(error-handling): add error handling and verbose output
Browse files Browse the repository at this point in the history
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
  • Loading branch information
ruru-m07 and coderabbitai[bot] authored Oct 20, 2024
1 parent b018ad7 commit 3a94dd6
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -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."

0 comments on commit 3a94dd6

Please sign in to comment.