command error

This commit is contained in:
pvincent
2026-07-25 14:34:07 +04:00
parent 1d60766305
commit 98deda9e6c
4 changed files with 10 additions and 8 deletions
+1 -6
View File
@@ -162,7 +162,6 @@ function on_exit {
fi
else
failure_payload="${last_error}"
miaou_debug "UNDEFINED last error=${last_error}"
regex="╟─⟶"
if [[ "$last_error" =~ $regex ]]; then
last_trim=false # keep the last error for next stacktrace
@@ -174,11 +173,7 @@ function on_exit {
stack_functions[0]="${stack_functions[0]} (hint: prefer source than subshell)"
[[ "${code}" == 128 ]] && failure_type='SUBSHELL_SOURCE_NOT_FOUND'
else
failure_type='UNDEFINED'
regex='^subshell term:'
if [[ "$last_error" =~ $regex ]]; then
failure_type='SUBSHELL_TERM2'
fi
failure_type='COMMAND_ERROR'
fi
fi