Warn when aur repo -u fails
Print a warning instead of silently counting 0 AUR updates, and stop discarding aur's stderr so the cause shows up in the journal.
This commit is contained in:
+5
-1
@@ -88,7 +88,11 @@ arch_updates=${#arch_list[@]}
|
|||||||
|
|
||||||
aur_updates=0
|
aur_updates=0
|
||||||
if command -v aur >/dev/null 2>&1; then
|
if command -v aur >/dev/null 2>&1; then
|
||||||
aur_updates=$(aur repo -u -d "$AUR_REPO" 2>/dev/null | wc -l)
|
if aur_out=$(aur repo -u -d "$AUR_REPO"); then
|
||||||
|
[[ -n $aur_out ]] && aur_updates=$(wc -l <<< "$aur_out")
|
||||||
|
else
|
||||||
|
echo "aur repo -u failed, AUR updates not counted" >&2
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
updates=$((arch_updates + aur_updates))
|
updates=$((arch_updates + aur_updates))
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user