BPM will no longer show a message if no packages have been installed when running bpm list -n or bpm list -l

This commit is contained in:
CapCreeperGR 2024-07-01 12:22:40 +03:00
parent eae1e05102
commit f6b182cc3d

View File

@ -97,10 +97,6 @@ func resolveCommand() {
log.Fatalf("Could not get installed packages\nError: %s", err.Error())
return
}
if len(packages) == 0 {
fmt.Println("No packages have been installed")
return
}
if pkgListNumbers {
fmt.Println(len(packages))
} else if pkgListNames {
@ -108,6 +104,10 @@ func resolveCommand() {
fmt.Println(pkg)
}
} else {
if len(packages) == 0 {
fmt.Println("No packages have been installed")
return
}
for n, pkg := range packages {
info := bpm_utils.GetPackageInfo(pkg, rootDir, false)
if info == nil {