mirror of
https://gitlab.alpinelinux.org/alpine/aports.git
synced 2025-08-27 01:11:33 +02:00
20 lines
890 B
Diff
20 lines
890 B
Diff
diff --git a/roundup.sh b/roundup.sh
|
|
index d7465dc..38d7efe 100755
|
|
--- a/roundup.sh
|
|
+++ b/roundup.sh
|
|
@@ -258,9 +258,11 @@ do
|
|
|
|
# exit subshell with return code of last failing command. This
|
|
# is needed to see the return code 253 on failed assumptions.
|
|
- # But, only do this if the error handling is activated.
|
|
- set -E
|
|
- trap 'rc=$?; set +x; set -o | grep "errexit.*on" >/dev/null && exit $rc' ERR
|
|
+ # But, only do this if the error handling is activated and only if the shell supports it
|
|
+ if set -o | grep "^errtrace" >/dev/null; then
|
|
+ set -o errtrace
|
|
+ trap 'rc=$?; set +x; set -o | grep "errexit.*on" >/dev/null && exit $rc' ERR
|
|
+ fi
|
|
|
|
# If `before` wasn't redefined, then this is `:`.
|
|
before
|