misc/upgrades-installed-check: handle apt-get errors
This commit is contained in:
parent
d5acf83916
commit
52917593c5
@ -15,6 +15,8 @@ if [ -e /etc/system-release ]; then
|
||||
[ "$exit_code" -eq 0 ] && echo "true"
|
||||
else
|
||||
## Debian
|
||||
set -e
|
||||
set -o pipefail
|
||||
apt_get_output="$(LANG="C" apt-get -s upgrade 2>&1)"
|
||||
exit_code="$?"
|
||||
echo "$apt_get_output" | awk "/^Inst/{ print $2 }" | [ "$(wc -L)" -eq 0 ] && echo "true" || echo "false"
|
||||
|
Loading…
Reference in New Issue
Block a user