Merge pull request #924 from MitchWeaver/master

fix pacman name conflict bug
This commit is contained in:
Herdiansyah 2018-03-20 07:34:21 +07:00 committed by GitHub
commit 79dcb5cfa8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 8 deletions

View File

@ -484,16 +484,9 @@ 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" | "BSD" | "iPhone OS" | "Solaris")
type -p pacman >/dev/null && \
type -p paclog-pkglist >/dev/null && \
packages="$(pacman -Qq --color never | wc -l)"
type -p dpkg >/dev/null && \