From cdba7cc6169034a60fdd2f67d474f0ba60e3a62e Mon Sep 17 00:00:00 2001 From: pvincent Date: Sat, 11 Jul 2026 15:53:54 +0400 Subject: [PATCH] ok --- bin/bash-back | 2 ++ lib/utility.bash | 8 ++++---- useless.sh | 4 ++-- 3 files changed, 8 insertions(+), 6 deletions(-) diff --git a/bin/bash-back b/bin/bash-back index 0538959..8c8b8ac 100755 --- a/bin/bash-back +++ b/bin/bash-back @@ -78,6 +78,8 @@ function on_exit { stack_summary+=("ERROR $code: [$message]") fi else + # FIXME: should grab the whole stacktrace, then print back again, + # because previous stderr might disappear from the first script after calling subprocess! regex="^ .*:[0-9]* .*\$" [[ "$last_error" =~ $regex ]] || stack_summary+=("ERROR $code: ") fi diff --git a/lib/utility.bash b/lib/utility.bash index 7f42be1..3be360e 100755 --- a/lib/utility.bash +++ b/lib/utility.bash @@ -8,12 +8,12 @@ function blabla { } function suite { - echo $nope + return exit - return 7 - exit 10 # youpi command_not_found - return + exit 10 # youpi + return 7 + echo $nope } blabla diff --git a/useless.sh b/useless.sh index 0323e08..1cfdf49 100755 --- a/useless.sh +++ b/useless.sh @@ -31,10 +31,10 @@ function F3 { echo start of useless F3 -lib/utility.bash +>&2 echo some trace in stderr . lib/utility.bash +lib/utility.bash -# >&2 echo some trace in stderr main # error echo end of useless