Pacman -Qmq returns with exit code 1 if no foreign packages found
RuijieYu opened this issue · 2 comments
RuijieYu commented
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.
Kharacternyk commented
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
RuijieYu commented
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.)