Skip to content

Commit b8b485f

Browse files
committed
log stdout/err from updates check on Debian
This is especially useful for diagnosing update check issues on Debian/Whonix.
1 parent eb83bb7 commit b8b485f

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

package-managers/upgrades-installed-check

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,11 +24,12 @@ elif [ -e /etc/debian_version ]; then
2424
set -e
2525
set -o pipefail
2626
# shellcheck disable=SC2034
27-
apt_get_update_output="$(apt-get -q update 2>&1)"
27+
apt_get_update_output="$(apt-get -q update 2>&1 | tee /proc/self/fd/2)"
2828
apt_get_upgrade_output="$(LANG="C" apt-get -s upgrade 2>&1)"
2929
exit_code="$?"
3030
# shellcheck disable=SC2266
3131
echo "$apt_get_upgrade_output" | awk "/^Inst/{ print $2 }" | [ "$(wc -L)" -eq 0 ] && echo "true" || echo "false"
32+
echo "$apt_get_upgrade_output" >&2
3233
elif [ -e /etc/arch-release ]; then
3334
## Archlinux
3435
checkupdates >/dev/null 2>&1

0 commit comments

Comments
 (0)