poc test 1

This commit is contained in:
pvincent
2026-07-28 20:51:05 +04:00
parent ebcfbed3e7
commit 9a0047d039
2 changed files with 10 additions and 14 deletions
+7 -3
View File
@@ -107,8 +107,12 @@ function on_error {
if [[ $$ == "$BASHPID" ]]; then if [[ $$ == "$BASHPID" ]]; then
if [[ ! -v failure_type ]]; then if [[ ! -v failure_type ]]; then
failure_type="COMMAND_ERROR" if [[ ${BASH_COMMAND} == 'false' ]]; then
failure_payload="${BASH_COMMAND}" failure_type="FALSE"
else
failure_type="COMMAND_ERROR"
failure_payload="${BASH_COMMAND}"
fi
print_miaou_error "${BASH_SOURCE[1]}" "${BASH_LINENO[0]}" "${failure_code}" "${failure_type}" print_miaou_error "${BASH_SOURCE[1]}" "${BASH_LINENO[0]}" "${failure_code}" "${failure_type}"
fi fi
@@ -270,7 +274,7 @@ function on_exit {
miaou_debug "</on_exit>" miaou_debug "</on_exit>"
fi fi
if [[ -v failure_type ]]; then if [[ $code -gt 0 && -v failure_type ]]; then
2>&3 >&4 dump_failure 2>&3 >&4 dump_failure
2>&3 >&4 dump_stacktrace 2>&3 >&4 dump_stacktrace
fi fi
+3 -11
View File
@@ -69,17 +69,9 @@ function do_false {
} }
function do_success { function do_success {
echo -n 'SUCCESS args=[' [[ true==true ]] && echo true
( ! false && echo unfalse
IFS=',' return
echo -n "$*"
)
echo ']'
source "${MIAOU_BASH_DIR}/lib/ansi.bash"
local content
content=$(PADDING_LEFT=2 PADDING_RIGHT=6 style_padding 'this is success')
content=$(FG=YELLOW BG=BLUE style_ansi "$content")
FG=BLACK BG=RED PADDING=8 style_block "$content"
} }
function do_unbound_variable { function do_unbound_variable {