Skip to content

Commit b919c2b

Browse files
committed
githook: pre-commit run tests
1 parent 835a79a commit b919c2b

1 file changed

Lines changed: 11 additions & 2 deletions

File tree

.githooks/pre-commit

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,16 @@ EOF
4646
fi
4747

4848
# If there are whitespace errors, print the offending file names and fail.
49-
exec git diff-index --check --cached $against --
49+
git diff-index --check --cached $against
50+
if [ "$?" -ne 0 ]
51+
then
52+
exit "$?"
53+
fi
5054

5155
# Configure and run the tests/examples
52-
exec cmake -B build
56+
cmake -B build
57+
if [ "$?" -ne 0 ]
58+
then
59+
exit "$?"
60+
fi
61+

0 commit comments

Comments
 (0)