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/vcs.xml
|
||||||
/.idea/workspace.xml
|
/.idea/workspace.xml
|
||||||
/goGoFetch
|
/goGoFetch
|
||||||
|
/gogofetch
|
||||||
@ -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()
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user