packages: Fix snap issue

This commit is contained in:
Dylan Araps 2018-06-05 06:33:27 +10:00
parent 81beb26972
commit 62aca46151

View file

@ -1297,7 +1297,10 @@ get_packages() {
# List these last as they accompany regular package managers.
has "flatpak" && tot flatpak list
has "snap" && tot snap list && ((packages-=1))
# Snap hangs if the command is run without the daemon running.
# Only run snap if the daemon is also running.
has "snap" && ps -e | grep -Fm 1 "snapd" && tot snap list && ((packages-=1))
;;
"Mac OS X" | "MINIX")