fix issue with wrapper discarding recipe failures

This commit is contained in:
Alexander Mahr 2025-01-01 17:04:25 +01:00
parent f83bf386cd
commit 2787aee01a

View file

@ -36,7 +36,11 @@ RUN <<EOF
cat > /bin/makefile-bash-wrapper.sh << 'WRAPPER'
#!/bin/bash
printf $'\033[0;32m''#----------------------------------------\n'$'\033[0m' >&2
bash "$@"
bash -e "$@" || {
EXITCODE=$?
printf $'\033[0;31m''ERROR EXITCODE='"$EXITCODE"'\n'$'\033[0m' >&2
exit $EXITCODE
}
printf '\n\n\n\n' >&2
WRAPPER
chmod u+x /bin/makefile-bash-wrapper.sh
@ -44,6 +48,7 @@ EOF
DOCKERFILEEOF
}
printf $'\033[0;33m'"$(date -Iseconds) starting build"'$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$\n'$'\033[0m'
diff Dockerfile <(DockerfileContent) 2>/dev/null > /dev/null || {
test -f Dockerfile && {
read -p 'reset/start Dockerfile[Y/n]' YES