Skip to content

Commit

Permalink
rpm-upgrade: add trap for error handling
Browse files Browse the repository at this point in the history
  • Loading branch information
grooverdan committed Nov 27, 2024
1 parent 87ac989 commit 03821e3
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions scripts/rpm-upgrade.sh
Original file line number Diff line number Diff line change
Expand Up @@ -194,6 +194,12 @@ fi

rpm_setup_bb_galera_artifacts_mirror
rpm_setup_bb_artifacts_mirror

# Any of the below steps could fail
# This is where the new packages are processed from
trap save_failure_logs ERR
set -e

if [[ $test_type == "major" ]]; then
# major upgrade (remove then install)
echo "$package_list" | xargs sudo "$pkg_cmd" "$pkg_cmd_options" install
Expand Down

0 comments on commit 03821e3

Please sign in to comment.