Skip to content

Commit 27c22a6

Browse files
author
Justus Rossmeier
authored
pacman: Fix script failure for no updates
When no updates are available, checkupdates fails with exit code 2. Catch this by wrapping the command using || true.
1 parent a5417e4 commit 27c22a6

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

pacman.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ 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
2020
if ! updates=$(/usr/bin/pacman -Qu | wc -l)

0 commit comments

Comments
 (0)