KittyKatt / screenFetch

Fetches system/theme information in terminal for Linux desktop screenshots.
GNU General Public License v3.0
3.86k stars 455 forks source link

Apple Silicon Homebrew Packages location #768

Closed unixb0y closed 4 days ago

unixb0y commented 1 year ago

I'm submitting a ... (check one with "x")

[X] bug report
[ ] new distro request

Bug report

screenfetch
ls: /usr/local/Cellar/: No such file or directory
[...] (rest looks ok)

Basically, this line has to be changed. The current version probably just works for Intel Macs, so there needs to be a switch that uses a different location based on architecture.

According to Stack Overflow:

brew_pkgs=$(ls -1 /usr/local/Cellar/ | wc -l) # for Intel

brew_pkgs=$(ls -1 /opt/homebrew/Cellar/ | wc -l) # for Apple Silicon

Alternatively, something like this may work (only tested on Apple Silicon):

brew_pkgs=$(ls -1 $(brew --prefix)/Cellar | wc -l)
JoeNyland commented 4 days ago

This has been fixed in 7942bb2a839ac2a116ba177bd8483166fd9cf7f0. If you're still seeing this issue, try installing from HEAD (brew install --HEAD screenfetch) as the version in Homebrew is out of date.