diff --git a/plugins/other/pacman_pending_updates b/plugins/other/pacman_pending_updates index 00c2ecdb..ce5e7f27 100755 --- a/plugins/other/pacman_pending_updates +++ b/plugins/other/pacman_pending_updates @@ -50,16 +50,22 @@ EOM ;; autoconf) - hash checkupdates &> /dev/null && echo yes || echo "no (checkupdates not found)" + if hash checkupdates >/dev/null 2>&1; then + echo yes + else + echo "no (checkupdates not found)" + fi ;; *) - updates="$(checkupdates)" || echo "updates.value U" && exit - if [ -n "$updates" ]; then - echo "updates.value $(echo "$updates" | wc -l)" - echo "updates.extinfo $(echo "$updates" | paste -s -d,)" - else - echo updates.value 0 + if updates="$(checkupdates)"; then + if [ -n "$updates" ]; then + echo "updates.value $(echo "$updates" | wc -l)" + echo "updates.extinfo $(echo "$updates" | paste -s -d,)" + else + echo updates.value 0 + fi + echo "updates.value U" && exit fi ;; esac