abort script in END_FOLD on non-zero exit code

This commit is contained in:
Julian Fleischer 2018-08-03 16:07:53 +02:00
parent 4f2f88c7b0
commit 86d34f0e65

View file

@ -18,6 +18,8 @@ BEGIN_FOLD () {
END_FOLD () {
RET=$?
echo "travis_fold:end:${CURRENT_FOLD_NAME}"
return $RET
if [ $RET != 0 ]; then
echo "${CURRENT_FOLD_NAME} failed with status code ${RET}"
fi
}