summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xbin/isolated-functions.sh9
1 files changed, 8 insertions, 1 deletions
diff --git a/bin/isolated-functions.sh b/bin/isolated-functions.sh
index bb9b9a042..9041846d0 100755
--- a/bin/isolated-functions.sh
+++ b/bin/isolated-functions.sh
@@ -79,11 +79,18 @@ die() {
fi
local n filespacing=0 linespacing=0
# setup spacing to make output easier to read
- for ((n = ${#FUNCNAME[@]} - 1; n >= 0; --n)); do
+ (( n = ${#FUNCNAME[@]} - 1 ))
+ while (( n > 0 )) ; do
+ [ "${FUNCNAME[${n}]}" == "qa_call" ] && break
+ (( n-- ))
+ done
+ (( n == 0 )) && (( n = ${#FUNCNAME[@]} - 1 ))
+ while (( n >= 0 )); do
sourcefile=${BASH_SOURCE[${n}]} sourcefile=${sourcefile##*/}
lineno=${BASH_LINENO[${n}]}
((filespacing < ${#sourcefile})) && filespacing=${#sourcefile}
((linespacing < ${#lineno})) && linespacing=${#lineno}
+ (( n-- ))
done
eerror