From 4fae7e7ddda78f6c6b2832efd63c18dff6b78171 Mon Sep 17 00:00:00 2001 From: Robin Candau Date: Thu, 4 Jan 2024 13:38:26 +0100 Subject: [PATCH] Correct alignment --- src/script/arch-update.sh | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/src/script/arch-update.sh b/src/script/arch-update.sh index 3aaa500..279a440 100755 --- a/src/script/arch-update.sh +++ b/src/script/arch-update.sh @@ -406,32 +406,40 @@ packages_cache() { echo main_msg "Removing old cached packages..." - if ! "${su_cmd}" paccache -r && echo; then + if ! "${su_cmd}" paccache -r; then echo error_msg "An error has occurred during the removal process\nThe removal has been aborted\n" + else + echo fi elif [ "${pacman_cache_old}" -eq 0 ] && [ "${pacman_cache_uninstalled}" -gt 0 ]; then echo main_msg "Removing uninstalled cached packages..." - if ! "${su_cmd}" paccache -ruk0 && echo; then + if ! "${su_cmd}" paccache -ruk0; then echo error_msg "An error has occurred during the removal process\nThe removal has been aborted\n" + else + echo fi elif [ "${pacman_cache_old}" -gt 0 ] && [ "${pacman_cache_uninstalled}" -gt 0 ]; then echo main_msg "Removing old cached packages..." - if ! "${su_cmd}" paccache -r && echo; then + if ! "${su_cmd}" paccache -r; then echo error_msg "An error has occurred during the removal process\nThe removal has been aborted\n" + else + echo fi main_msg "Removing uninstalled cached packages..." - if ! "${su_cmd}" paccache -ruk0 && echo; then + if ! "${su_cmd}" paccache -ruk0; then echo error_msg "An error has occurred during the removal process\nThe removal has been aborted\n" + else + echo fi fi ;;