subshell error

This commit is contained in:
pvincent
2026-07-14 16:13:26 +04:00
parent 827700d142
commit 4a88abbe08
+10 -3
View File
@@ -142,6 +142,9 @@ function on_exit {
if [[ "${code}" == 128 ]]; then if [[ "${code}" == 128 ]]; then
failure_type='SUBSHELL SOURCE NOT FOUND' failure_type='SUBSHELL SOURCE NOT FOUND'
stack_functions[0]="${stack_functions[0]} (hint: prefer source than subshell:2)" stack_functions[0]="${stack_functions[0]} (hint: prefer source than subshell:2)"
else
failure_type='SUBSHELL ERROR'
stack_functions[0]="${stack_functions[0]} (hint: prefer source than subshell:3)"
fi fi
else else
regex='^pipe error:' regex='^pipe error:'
@@ -176,9 +179,13 @@ function dump_failure {
if [[ ${failure_type} == 'SUBSHELL SOURCE NOT FOUND' ]]; then if [[ ${failure_type} == 'SUBSHELL SOURCE NOT FOUND' ]]; then
: :
else else
>&4 echo "CODE: ${code}" if [[ $failure_type == 'SUBSHELL ERROR' ]]; then
>&4 echo "TYPE: ${failure_type}" >&4 echo -e "${failure_payload}"
>&4 echo "PAYLOAD: ${failure_payload}" else
>&4 echo "CODE: ${code}"
>&4 echo "TYPE: ${failure_type}"
>&4 echo "PAYLOAD: ${failure_payload}"
fi
fi fi
for i in "${failure_traces[@]}"; do for i in "${failure_traces[@]}"; do
>&4 echo -e "$i" >&4 echo -e "$i"