Description: Fix launches pacman game
Forwarded: https://github.com/dylanaraps/neofetch/issues/457
Author: Dylan Araps <dylan.araps@gmail.com>
Origin: vendor, http://bugs.debian.org/cgi-bin/bugreport.cgi?msg=80;bug=265678
Bug-Debian: http://bugs.debian.org/845629
Last-Update: 2016-11-25

diff --git a/neofetch b/neofetch
index 56a0366..a90b1bd 100755
--- a/neofetch
+++ b/neofetch
@@ -375,6 +375,14 @@ getuptime() {
 # Package Count {{{
 
 getpackages() {
+    # Remove /usr/games from $PATH.
+    # This solves issues with neofetch opening the
+    # 'pacman' game.
+    local PATH=":${PATH}:"
+    local PATH="${PATH/':/usr/games:'/:}"
+    local PATH="${PATH%:}"
+    local PATH="${PATH#:}"
+
     case "$os" in
         "Linux" | "iPhone OS" | "Solaris")
             type -p pacman >/dev/null 2>&1 && \
-- 
2.10.1

