fix: end the bootstrap with 130 on ctrl+c

This commit is contained in:
Abdessamad Derraz committed 2026-11-05 19:25:33 +01:00
1 parent 73b82375d9
commit c54a68c6ca
2 files changed
+53 -1

No files matched your search

+7 -1
View File
@@ -34,7 +34,13 @@ cleanup() {
rmdir -- "$TEMP_DIRECTORY" 2>/dev/null || true
fi
}
trap cleanup EXIT HUP INT TERM
# A signal ends the run with the code a shell gives it, 130 for Ctrl+C:
# trapped by cleanup alone, the run went on, and Ctrl+C during the download
# was told as a network failure, with code 1.
trap cleanup EXIT
trap 'exit 129' HUP
trap 'exit 130' INT
trap 'exit 143' TERM
if [ -z "$INSTALLER" ] || [ ! -f "$INSTALLER" ]; then
install_url=${RETROBIOS_INSTALL_URL:-$DEFAULT_INSTALL_URL}