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:
Daniele Fucini
2026-10-14 13:06:40 +02:00
parent f32d2a0c87
commit 4a9eebcad2
+5 -1
View File
@@ -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))