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/vcs.xml
/.idea/workspace.xml /.idea/workspace.xml
/goGoFetch /goGoFetch
/gogofetch

View File

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