Error handler now returns a string instead (closes #10)
Commit hook now properly returns status code on failed formatting
This commit is contained in:
parent
64161ddcda
commit
6af5368a87
4 changed files with 20 additions and 7 deletions
|
|
@ -1,7 +1,10 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
# This hook lints the code, and if we're on develop or master, also forces the tests to pass.
|
||||
cargo fmt -- --check
|
||||
make lint &> /dev/null 2>&1 || {
|
||||
>&2 echo "Format check failed, use 'make lint' for more information.";
|
||||
exit 1;
|
||||
}
|
||||
|
||||
branch=`git rev-parse --abbrev-ref HEAD`
|
||||
|
||||
|
|
|
|||
Reference in a new issue