afetch icon indicating copy to clipboard operation
afetch copied to clipboard

Homebrew directory hardcoded

Open polluks2 opened this issue 3 years ago • 1 comments

ls: /usr/local/Cellar/*: No such file or directory
          .:'          USER polluks
      __ :'__            OS macOS 12.4
   .'`__`-'__``.     KERNEL 21.5.0
  :__________.-'     UPTIME 243h 16m
  :_________:         SHELL zsh
   :_________`-;       PKGS 0
    `.__.-.__.' 

because of

$ ls /opt/homebrew/Cellar | wc -l
     163

duplicate of #65

polluks2 avatar Jun 16 '22 17:06 polluks2

How about this?

diff --git a/src/fetch.c b/src/fetch.c
index 3cfb582..d017628 100644
--- a/src/fetch.c
+++ b/src/fetch.c
@@ -468,7 +468,7 @@ void *os()
                        free(iosVer);
                } else {
                        info.getPkgCount =
-                           "ls /usr/local/Cellar/* | grep ':' | wc -l | xargs";
+                           "brew list | wc -l | xargs";
 
                        char *macVer = malloc(64);
                        strcpy(macVer, "macOS ");

polluks2 avatar Jun 17 '22 15:06 polluks2