Browse Source

subshell error

main
pvincent 2 weeks ago
parent
commit
4a88abbe08
  1. 7
      bin/miaou-bash

7
bin/miaou-bash

@ -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:'
@ -175,11 +178,15 @@ function dump_failure {
debug '---stacktrace---' debug '---stacktrace---'
if [[ ${failure_type} == 'SUBSHELL SOURCE NOT FOUND' ]]; then if [[ ${failure_type} == 'SUBSHELL SOURCE NOT FOUND' ]]; then
: :
else
if [[ $failure_type == 'SUBSHELL ERROR' ]]; then
>&4 echo -e "${failure_payload}"
else else
>&4 echo "CODE: ${code}" >&4 echo "CODE: ${code}"
>&4 echo "TYPE: ${failure_type}" >&4 echo "TYPE: ${failure_type}"
>&4 echo "PAYLOAD: ${failure_payload}" >&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"
done done

Loading…
Cancel
Save