Skip to content

Commit

Permalink
fix pre-commit hook
Browse files Browse the repository at this point in the history
  • Loading branch information
nkostoulas committed Feb 28, 2019
1 parent e09e6be commit 8a5f841
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion .hooks/pre-commit
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,12 @@ if [ $? != 0 ]; then
fi

$CARGO_FMT -- --check
if [ $? != 0 ]; then
result=$?

if [ $result != 0 ]; then
printf "[pre_commit] $CARGO_FMT → \033[0;31merror\033[0m \n"
else
printf "[pre_commit] $CARGO_FMT → \033[0;32mOK\033[0m \n"
fi

exit $result

0 comments on commit 8a5f841

Please sign in to comment.