installer: preserve exit code in error handler

This commit is contained in:
Ryan Hughes
2026-06-04 18:34:35 -04:00
parent bd9692d6e3
commit 58f03a9216
+3 -3
View File
@@ -74,6 +74,9 @@ restore_outputs() {
# Error handler
catch_errors() {
# Store exit code before any conditionals or assignments overwrite $?.
local exit_code=$?
# Prevent recursive error handling
if [[ $ERROR_HANDLING == "true" ]]; then
return
@@ -81,9 +84,6 @@ catch_errors() {
ERROR_HANDLING=true
fi
# Store exit code immediately before it gets overwritten
local exit_code=$?
stop_log_output
restore_outputs