fix: Show QEMU errors on unexpected exit (#1873)

This commit is contained in:
Kroese
2026-07-17 05:13:37 +02:00
committed by GitHub
parent 2f70dbde3c
commit 11a16d34f8
2 changed files with 19 additions and 3 deletions
+13 -1
View File
@@ -186,6 +186,12 @@ cleanupHelpers() {
finish() {
local reason=$1
local failed=0
if [ ! -f "$QEMU_END" ] && (( reason != 0 )); then
failed=1
fi
touch "$QEMU_END"
forceKillQemu "$reason"
@@ -200,7 +206,13 @@ finish() {
warn "Timed out while waiting for $(app) to exit!"
fi
(( reason != 1 )) && echo && echo " Shutdown completed!"
echo
if (( failed == 0 )); then
echo " Shutdown completed!"
else
error "QEMU exited unexpectedly!"
fi
exit "$reason"
}