don't stop global execution when hooks return errors

This commit is contained in:
Jérémy Lecour 2020-11-19 21:18:05 +01:00 committed by Jérémy Lecour
parent 7b8896d3e8
commit 86e64187cc
2 changed files with 4 additions and 1 deletions

View file

@ -17,7 +17,8 @@ This project does not follow semantic versioning.
### Fixed
exclude only hooks with .disable to execute hooks with .sh
* exclude only hooks with .disable to execute hooks with .sh
* don't stop global execution when hooks return errors
## [20.08] - 2020-08-21

View file

@ -286,11 +286,13 @@ main() {
# search for files in hooks directory
for hook in $(find ${HOOKS_DIR} -type f -executable | sort); do
set +e
# keep only executables files, not containing a "."
if [ -x "${hook}" ] && (basename "${hook}" | grep -vqF ".disable"); then
debug "Executing ${hook}"
${hook}
fi
set -e
done
}