diff --git a/package-managers/upgrades-installed-check b/package-managers/upgrades-installed-check index aaf18ccc..cca7e419 100755 --- a/package-managers/upgrades-installed-check +++ b/package-managers/upgrades-installed-check @@ -24,11 +24,13 @@ elif [ -e /etc/debian_version ]; then set -e set -o pipefail # shellcheck disable=SC2034 - apt_get_update_output="$(apt-get -q update 2>&1)" - apt_get_upgrade_output="$(LANG="C" apt-get -s upgrade 2>&1)" + apt_get_update_output="$(apt-get -q update 2>&1)" || { echo "$apt_get_update_output" >&2; exit 1; } + apt_get_upgrade_output="$(LANG="C" apt-get -s upgrade 2>&1)" || { echo "$apt_get_upgrade_output" >&2; exit 1; } exit_code="$?" # shellcheck disable=SC2266 echo "$apt_get_upgrade_output" | awk "/^Inst/{ print $2 }" | [ "$(wc -L)" -eq 0 ] && echo "true" || echo "false" + echo "$apt_get_update_output" >&2 + echo "$apt_get_upgrade_output" >&2 elif [ -e /etc/arch-release ]; then ## Archlinux checkupdates >/dev/null 2>&1