|
|
@ -161,10 +161,9 @@ function on_exit { |
|
|
fi |
|
|
fi |
|
|
fi |
|
|
fi |
|
|
else |
|
|
else |
|
|
failure_type='UNDEFINED' |
|
|
|
|
|
miaou_debug "last error=${last_error}" |
|
|
|
|
|
failure_payload="${last_error}" |
|
|
failure_payload="${last_error}" |
|
|
regex="^ .*:[0-9]* .*\$" |
|
|
|
|
|
|
|
|
miaou_debug "UNDEFINED last error=${last_error}" |
|
|
|
|
|
regex="╟─⟶" |
|
|
if [[ "$last_error" =~ $regex ]]; then |
|
|
if [[ "$last_error" =~ $regex ]]; then |
|
|
if [[ "${code}" == 128 ]]; then |
|
|
if [[ "${code}" == 128 ]]; then |
|
|
failure_type='SUBSHELL_SOURCE_NOT_FOUND' |
|
|
failure_type='SUBSHELL_SOURCE_NOT_FOUND' |
|
|
@ -174,6 +173,7 @@ function on_exit { |
|
|
stack_functions[0]="${stack_functions[0]} (hint: prefer source than subshell:3)" |
|
|
stack_functions[0]="${stack_functions[0]} (hint: prefer source than subshell:3)" |
|
|
fi |
|
|
fi |
|
|
else |
|
|
else |
|
|
|
|
|
failure_type='UNDEFINED' |
|
|
regex='^subshell term:' |
|
|
regex='^subshell term:' |
|
|
if [[ "$last_error" =~ $regex ]]; then |
|
|
if [[ "$last_error" =~ $regex ]]; then |
|
|
failure_type='SUBSHELL_TERM2' |
|
|
failure_type='SUBSHELL_TERM2' |
|
|
@ -229,7 +229,7 @@ function ansi_traces { |
|
|
declare -n functions=$3 |
|
|
declare -n functions=$3 |
|
|
optional=false |
|
|
optional=false |
|
|
for i in "${!sources[@]}"; do |
|
|
for i in "${!sources[@]}"; do |
|
|
FG=RED style_ansi " ╟─⟶" |
|
|
|
|
|
|
|
|
FG=RED style_ansi " ╟─⟶ " |
|
|
location=$(printf "%40s" "${sources[$i]}:${lines[$i]}") |
|
|
location=$(printf "%40s" "${sources[$i]}:${lines[$i]}") |
|
|
is_true "$optional" && |
|
|
is_true "$optional" && |
|
|
location=$(FG=GRAY STYLE=ITALIC style_ansi "$location") || |
|
|
location=$(FG=GRAY STYLE=ITALIC style_ansi "$location") || |
|
|
@ -297,7 +297,7 @@ BASH_ARGV0="$1" && shift # to pretend script runs by itself |
|
|
# magic FD + delayed tee => /dev/fd/3 means delayed stderr, /dev/fd/4 remains original stderr |
|
|
# magic FD + delayed tee => /dev/fd/3 means delayed stderr, /dev/fd/4 remains original stderr |
|
|
exec 3> >(tee "$MIAOU_BASH_ERROR" >/dev/null) 4>/dev/stderr |
|
|
exec 3> >(tee "$MIAOU_BASH_ERROR" >/dev/null) 4>/dev/stderr |
|
|
|
|
|
|
|
|
miaou_debug '---stdout---' |
|
|
|
|
|
|
|
|
miaou_debug "---stdout--$$ $BASHPID $PPID--" |
|
|
# shellcheck source=/dev/null |
|
|
# shellcheck source=/dev/null |
|
|
source "$BASH_ARGV0" 2>&3 |
|
|
source "$BASH_ARGV0" 2>&3 |
|
|
dump_success |
|
|
dump_success |