Skip to content

Commit

Permalink
Merge pull request #772 from carlosramosgonz/fix-homebrew-macos
Browse files Browse the repository at this point in the history
Fix Homebrew package count on macOS
  • Loading branch information
darealshinji authored Jul 14, 2023
2 parents fb602f8 + 7942bb2 commit 2f12dde
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion screenfetch-dev
Original file line number Diff line number Diff line change
Expand Up @@ -1439,7 +1439,11 @@ detectpkgs () {
pkgs=$((pkgs + (port_pkgs - offset)))
fi
if type -p brew >/dev/null 2>&1; then
brew_pkgs=$(ls -1 /usr/local/Cellar/ | wc -l)
if [ -d "/opt/homebrew/Cellar" ]; then
brew_pkgs=$(ls -1 /opt/homebrew/Cellar/ | wc -l)
else
brew_pkgs=$(ls -1 /usr/local/Cellar/ | wc -l)
fi
pkgs=$((pkgs + brew_pkgs))
fi
if type -p pkgin >/dev/null 2>&1; then
Expand Down

0 comments on commit 2f12dde

Please sign in to comment.