Fix local pre-commit hooks not running
This commit is contained in:
parent
ecc3bbad3f
commit
357a404895
1 changed files with 9 additions and 6 deletions
|
@ -58,17 +58,20 @@ case $indentation in
|
|||
;;
|
||||
esac
|
||||
|
||||
if [ -n "$error" ]
|
||||
then exit 1
|
||||
fi
|
||||
|
||||
cd $GIT_DIR
|
||||
rm -rf $temp
|
||||
|
||||
if [ -z "$error" ]
|
||||
then exit 0
|
||||
else exit 1
|
||||
fi
|
||||
|
||||
hook=$(basename $0)
|
||||
if [ -f $GIT_DIR/hooks/$hook ]
|
||||
if [ -f "$GIT_DIR/hooks/$hook" ]
|
||||
then
|
||||
echo Running project-level hook: $GIT_DIR/hooks/$hook
|
||||
$GIT_DIR/hooks/$hook
|
||||
error=$?
|
||||
if [ -n "$error" ]
|
||||
then exit $error
|
||||
fi
|
||||
fi
|
||||
|
|
Loading…
Reference in a new issue