Merge pull request #458 from dylanaraps/pacman

Packages: Remove /usr/games from PATH to fix issues with pacman game
This commit is contained in:
Dylan Araps 2016-11-26 00:02:55 +11:00 committed by GitHub
commit 9f27ea4376
1 changed files with 8 additions and 0 deletions

View File

@ -357,6 +357,14 @@ get_uptime() {
}
get_packages() {
# 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" | "GNU")
type -p pacman >/dev/null && \