mirror of
https://github.com/Jguer/yay
synced 2024-09-14 13:51:12 +00:00
Merge branch 'Morganamilo-fix#337'
This commit is contained in:
commit
bc9439b26e
12
print.go
12
print.go
|
@ -55,9 +55,13 @@ func (q aurQuery) printSearch(start int) {
|
|||
toprint += bold(red("(Out-of-date "+formatTime(res.OutOfDate)+")")) + " "
|
||||
}
|
||||
|
||||
if _, err := localDb.PkgByName(res.Name); err == nil {
|
||||
if pkg, err := localDb.PkgByName(res.Name); err == nil {
|
||||
if pkg.Version() != res.Version {
|
||||
toprint += bold(green("(Installed: " + pkg.Version() + ")"))
|
||||
} else {
|
||||
toprint += bold(green("(Installed)"))
|
||||
}
|
||||
}
|
||||
toprint += "\n " + res.Description
|
||||
fmt.Println(toprint)
|
||||
}
|
||||
|
@ -89,10 +93,14 @@ func (s repoQuery) printSearch() {
|
|||
|
||||
localDb, err := alpmHandle.LocalDb()
|
||||
if err == nil {
|
||||
if _, err = localDb.PkgByName(res.Name()); err == nil {
|
||||
if pkg, err := localDb.PkgByName(res.Name()); err == nil {
|
||||
if pkg.Version() != res.Version() {
|
||||
toprint += bold(green("(Installed: " + pkg.Version() + ")"))
|
||||
} else {
|
||||
toprint += bold(green("(Installed)"))
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
toprint += "\n " + res.Description()
|
||||
fmt.Println(toprint)
|
||||
|
|
Loading…
Reference in a new issue