Kharacternyk/pacwall

Pacman -Qmq returns with exit code 1 if no foreign packages found

RuijieYu opened this issue · 2 comments

Title. This tripped me up when I was trying to implement the sudo mode.
Just need to replace pacman -Qmq with pacman -Qmq || true. I can make the fix if necessary.

What's wrong with returning 1? The script shouldn't panic because we temporally unset -e:

set +e
_PKGS="$(pacman -Qq$PACMAN_FLAGS)"
set -e

Sorry I just noticed you had worked around it in the newest 2 commits.

(Yeah I really should start rebasing with master before I file a new issue.)