From 0e885a6ec4e5fa5c681ce53b6397c8c16c1f53aa Mon Sep 17 00:00:00 2001 From: JonJagger Date: Sun, 9 Aug 2026 06:28:01 +0100 Subject: [PATCH] Make exit_non_zero actually exit kill -INT $$ only stops the script while nothing traps INT. Add a cleanup trap on INT - a normal thing for a script to do - and bash runs the handler and resumes at the next statement, so a guard prints its error and the script carries on to exit 0. exit 42 cannot be declined, and the EXIT trap still cleans up. --- bin/lib.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bin/lib.sh b/bin/lib.sh index 215e1509..a31f9a5f 100644 --- a/bin/lib.sh +++ b/bin/lib.sh @@ -49,7 +49,7 @@ stderr() exit_non_zero() { - kill -INT $$ + exit 42 } containers_down()