[modules/pacman] Fix update path for AUR installs

If bumblebee-status is installed from an AUR package, using the relative
binary path might not work, so fall back to the binary installed in
/usr/share.

fixes #536
This commit is contained in:
Tobias Witek 2020-01-30 21:11:28 +01:00
parent 65a9f66b9e
commit da3df1769e

View file

@ -24,7 +24,10 @@ repos = ["core", "extra", "community", "multilib", "testing", "other"]
def get_pacman_info(widget, path):
try:
result = bumblebee.util.execute("{}/../../bin/pacman-updates".format(path))
cmd = "{}/../../bin/pacman-updates".format(path)
if not os.path.exists(cmd):
cmd = "/usr/share/bumblebee-status/bin/pacman-update"
result = bumblebee.util.execute(cmd)
except:
pass