fix: Bash callstack correction

main
Sean McBride 4 years ago
parent ea6c40ab3c
commit dcedafdc44

@ -10,7 +10,7 @@ __common_dump_callstack() {
echo "Call Stack:" echo "Call Stack:"
# Skip the dump_bash_stack and error_msg_frames # Skip the dump_bash_stack and error_msg_frames
for ((i = 2; i < ${#FUNCNAME[@]}; i++)); do for ((i = 2; i < ${#FUNCNAME[@]}; i++)); do
printf "\t%d - %s\n" "$((i - 2))" "${FUNCNAME[i]} (${BASH_SOURCE[i + 1]}:${BASH_LINENO[i]})" printf "\t%d - %s\n" "$((i - 2))" "${FUNCNAME[i]} (${BASH_SOURCE[i + 1]}:${BASH_LINENO[i + 1]})"
done done
} }

Loading…
Cancel
Save