Update build.func
This commit is contained in:
parent
219e800870
commit
24b5340ed8
@ -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
|
||||||
|
Loading…
x
Reference in New Issue
Block a user