just quick fix, pkgs system will be updated

This commit is contained in:
nekohepott 2026-06-17 04:16:26 +03:00
parent aa142afa78
commit 1df5466434
No known key found for this signature in database
2 changed files with 6 additions and 4 deletions

1
.gitignore vendored
View File

@ -13,3 +13,4 @@ result/
/.idea/vcs.xml
/.idea/workspace.xml
/goGoFetch
/gogofetch

View File

@ -25,11 +25,12 @@ func GetPkgs() string {
var pkgs string
haveNix := checkNix()
if strings.HasPrefix(id, "arch") {
entries, err := os.ReadDir("/run/current-system/sw/bin")
if err != nil {
return "can't get nix packages"
out, _ := exec.Command("sh", "-c", "pacman -Qq | wc -l").Output()
pkgs = strings.TrimSpace(string(out)) + " (pacman)"
if haveNix {
pkgs = strings.TrimSpace(pkgs + ", " + addNix())
}
return strconv.Itoa(len(entries)) + " (nix)"
return pkgs
}
if strings.HasPrefix(id, "debian") {
out, _ := exec.Command("sh", "-c", "dpkg -l | grep ^ii | wc -l").Output()