Skip to content

Commit 129929c

Browse files
Justus Rossmeierrossmeier
Justus Rossmeier
authored andcommitted
pacman: Fix script failure for no updates
When no updates are available, checkupdates and pacman -Qu fail. Catch this by wrapping the command using || true. Signed-off-by: Justus Rossmeier <[email protected]>
1 parent a5417e4 commit 129929c

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

pacman.sh

+2-2
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,10 @@ set -o pipefail
1414

1515
if [ -x /usr/bin/checkupdates ]
1616
then
17-
updates=$(/usr/bin/checkupdates | wc -l)
17+
updates=$( (checkupdates || true) | wc -l)
1818
cache=0
1919
else
20-
if ! updates=$(/usr/bin/pacman -Qu | wc -l)
20+
if ! updates=$( (/usr/bin/pacman -Qu || true) | wc -l)
2121
then
2222
updates=0
2323
fi

0 commit comments

Comments
 (0)