just quick fix, pkgs system will be updated
This commit is contained in:
parent
aa142afa78
commit
1df5466434
1
.gitignore
vendored
1
.gitignore
vendored
@ -13,3 +13,4 @@ result/
|
||||
/.idea/vcs.xml
|
||||
/.idea/workspace.xml
|
||||
/goGoFetch
|
||||
/gogofetch
|
||||
@ -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()
|
||||
|
||||
Loading…
Reference in New Issue
Block a user