summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--scripts/image_signing/common.sh3
1 files changed, 3 insertions, 0 deletions
diff --git a/scripts/image_signing/common.sh b/scripts/image_signing/common.sh
index 5f5287aa..f1fd3ef7 100644
--- a/scripts/image_signing/common.sh
+++ b/scripts/image_signing/common.sh
@@ -32,6 +32,8 @@ perform_latest_cleanup_action() {
# Performs clean up by executing actions in the cleanup_actions array in
# reversed order.
cleanup() {
+ # Save the existing return value.
+ rv=$?
set +e
while [ ${#cleanup_actions[*]} -gt 0 ]; do
@@ -39,6 +41,7 @@ cleanup() {
done
set -e
+ return $rv
}
# ANSI color codes used when displaying messages.