common.sh: don't let eval terminate cleanup
Eval will terminate the shell on non-zero error code.
"POSIX says that an error in a special built-in utility
(such as eval) should cause the non-interactive shell to terminate"
This is the case and is causing cleanup to terminate android signing
with a non-zero error when it is clear the intent (given the set +e) is
that we should be best effort here.
BUG=chromium:1141907
TEST=unittest and manually on a signer
Change-Id: Ie6374b292c7982371d549b919b44328ea71a09dd
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/vboot_reference/+/2513228
Reviewed-by: George Engelbrecht <engeg@google.com>
Tested-by: George Engelbrecht <engeg@google.com>
diff --git a/scripts/image_signing/common.sh b/scripts/image_signing/common.sh
index 8f5aac0..41abaaa 100644
--- a/scripts/image_signing/common.sh
+++ b/scripts/image_signing/common.sh
@@ -21,7 +21,7 @@
perform_latest_cleanup_action() {
local num_actions=${#cleanup_actions[*]}
if [ ${num_actions} -gt 0 ]; then
- eval "${cleanup_actions[$num_actions-1]}" > /dev/null 2>&1
+ eval "${cleanup_actions[$num_actions-1]} || true" > /dev/null 2>&1
unset cleanup_actions[$num_actions-1]
fi
}