Skip to content

Commit

Permalink
Fix red colors in pre-commit hook
Browse files Browse the repository at this point in the history
  • Loading branch information
ly0va committed Oct 4, 2020
1 parent 9a764ce commit ccfd0ec
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions .githooks/pre-commit
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ NC='\033[0m' # No Color

# Check that `rustfmt` rules are not violated.
if ! cargo fmt -- --check; then
echo "${RED}Commit error!${NC}"
echo -e "${RED}Commit error!${NC}"
echo "Please format the code via 'cargo fmt', cannot commit unformatted code"
exit 1
fi
Expand All @@ -17,7 +17,7 @@ VERFIER_CONTRACT_FILE="contracts/contracts/Verifier.sol"

# Check if diff for contract contains setting the `DUMMY_VERIFIER` to the true.
if git diff --cached $VERFIER_CONTRACT_FILE | grep -lq 'constant DUMMY_VERIFIER = true'; then
echo "${RED}Commit error!${NC}"
echo -e "${RED}Commit error!${NC}"
echo "It seems that line 'constant DUMMY_VERIFIER = true' in 'Verifier.sol' is staged to be committed"
echo "Cannot commit the code with enabled DUMMY_VERIFIER"
echo "Please disable the DUMMY_VERIFIER and try to commit changes again"
Expand Down

0 comments on commit ccfd0ec

Please sign in to comment.