sign_official_build: Remove "|| ret=$?" in resign_firmware_payload
In resign_firmware_payload(), resign_firmware_shellball() is invoked
with `|| ret=$?` to record the exit status and attempt to run
`sudo umount "${rootfs_dir}"` afterwards.
However, invoking a function in an `||` list suppresses `set -e`
throughout the function's execution tree. If a command inside fails
without explicitly calling `die`, the error is silently ignored and the
function may still return 0, masking failures. Furthermore, if a command
does call `die`, `exit 1` terminates the script immediately, so
`|| ret=$?` and subsequent cleanup lines are never reached anyway.
Since make_temp_dir() already registers temporary mount directories in
TEMP_DIR_LIST, any script exit or fatal error triggers the global EXIT
trap (cleanup_temps_and_mounts()), ensuring proper unmounting.
Remove `|| ret=$?` so that errors inside resign_firmware_shellball()
propagate naturally under `set -e`.
BUG=b:557267321
TEST=make runtests
BRANCH=none
TAG=agy
CONV=705e5b3f-acf0-4ebd-91be-9a3d57b9198a
Signed-off-by: Yu-Ping Wu <yupingso@google.com>
Change-Id: I949588845d06c49202be22d844df0a156a6a6964
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/vboot_reference/+/8364946
Tested-by: Yu-Ping Wu <yupingso@chromium.org>
Reviewed-by: Julius Werner <jwerner@chromium.org>
Commit-Queue: Yu-Ping Wu <yupingso@chromium.org>
1 file changed