[BUG] Brew packages are displayed +1
Markos-Th09 opened this issue · 7 comments
Describe the bug
The total number of homebrew packages including casks, bottles and formulae is also displayed +1. For example if I have 4 packages, they are displayed as 5.
To Reproduce
Steps to reproduce the behavior:
- Install macchina in macOS
- Install homebrew
- Install some homebrew packages
- Use the macchina program
Expected behavior
The total amount of packages should display the actual count
System Information
You don't have to provide this information if you're not comfortable doing so, but it'll help us solve the issue a lot faster.
- Distribution: none
- Desktop Environment: Aqua (not an option but whatever)
- Operating System: macOS
- Terminal: macOS terminal
- Macchina's version: 6.1.5
Can you show me the output of brew list | wc -l
?
Can you show me the output of
brew list | wc -l
?
brew list|wc -l
4
Actually I used a different command which also shows bottles (dependencies) which I assumed it was also counting
brew info --json=v1 --installed | jq -r "map(select(.installed[].poured_from_bottle) | .name) | unique | .[]"|wc -l
.
Edit: actually piping brew list
seems to do the same thing
I just actually found the problem. There seems to also be a .keepme
file along the packages (referring to this issue)
This problem comes down to libmacchina
Hmm, I thought we ignored any ".keepme"s.
This is an easy fix :)
I'll also subtract the result by one.
Ok although imo the more correct solution fix would be to also check if the .keepme is there first
Also unrelated but I just noticed it isn't showing anything from cargo
Moving this to libmacchina