Update build.func

This commit is contained in:
CanbiZ 2025-07-21 15:07:53 +02:00
parent 219e800870
commit 24b5340ed8

View File

@ -31,7 +31,7 @@ fi
# This function enables error handling in the script by setting options and defining a trap for the ERR signal. # This function enables error handling in the script by setting options and defining a trap for the ERR signal.
catch_errors() { catch_errors() {
set -Eeo pipefail set -Eeo pipefail
if [ -n "$BASH_VERSION" ]; then if [ -n "$BASH_VERSION" ] && command -v shopt >/dev/null 2>&1; then
shopt -s errtrace shopt -s errtrace
fi fi
trap 'error_handler $LINENO "$BASH_COMMAND"' ERR trap 'error_handler $LINENO "$BASH_COMMAND"' ERR