From 7788e7cd877a25c380b9e7b5329816ee1863d0b2 Mon Sep 17 00:00:00 2001 From: Cameron Ryder Date: Thu, 8 Jun 2023 00:40:23 -0400 Subject: [PATCH] fix: now the --silent flag is always silent --- scripts/utilities.sh | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/scripts/utilities.sh b/scripts/utilities.sh index 868b667..4affc3c 100644 --- a/scripts/utilities.sh +++ b/scripts/utilities.sh @@ -375,10 +375,13 @@ function update_system_package_lists() { # update if cache is greater than 48 hours old if [[ $update_age -gt $((48*60*60)) ]]; then if [[ ! $silent ]]; then status_msg "Updating package lists..."; fi - if ! sudo apt-get update --allow-releaseinfo-change; then + if ! sudo apt-get update --allow-releaseinfo-change &>/dev/null; then log_error "Failure while updating package lists!" if [[ ! $silent ]]; then error_msg "Updating package lists failed!"; fi exit 1 + else + log_info "Package lists updated successfully" + if [[ ! $silent ]]; then status_msg "Updated package lists."; fi fi else log_info "Package lists updated recently, skipping update..."