From 2157b454865ab70685da1f07fa3233287bfd135b Mon Sep 17 00:00:00 2001 From: AI Agent Date: Sat, 14 Mar 2026 18:32:54 -0600 Subject: [PATCH] Enhance error handling in ssh_mud function by temporarily disabling exit on error. This allows for graceful handling of MUD connection closures without terminating the script prematurely. --- run-tests.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/run-tests.sh b/run-tests.sh index 85d1fb8..9810a3e 100755 --- a/run-tests.sh +++ b/run-tests.sh @@ -6,8 +6,10 @@ SERVER_PID= # SSH returns 255 when MUD closes connection after quit — treat as success ssh_mud() { + set +e ssh -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null -p 2222 "$@" r=$? + set -e [[ $r -eq 0 || $r -eq 255 ]] || exit 1 }