From 62aca4615127743836640ec47f7fa3d61259dc99 Mon Sep 17 00:00:00 2001 From: Dylan Araps Date: Tue, 5 Jun 2018 06:33:27 +1000 Subject: [PATCH] packages: Fix snap issue --- neofetch | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/neofetch b/neofetch index 6e4cd890..329724de 100755 --- a/neofetch +++ b/neofetch @@ -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")