Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Homebrew directory hardcoded #86

Open
polluks2 opened this issue Jun 16, 2022 · 1 comment
Open

Homebrew directory hardcoded #86

polluks2 opened this issue Jun 16, 2022 · 1 comment

Comments

@polluks2
Copy link

polluks2 commented Jun 16, 2022

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
Copy link
Author

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 ");

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant