afetch
afetch copied to clipboard
Homebrew directory hardcoded
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
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 ");