Merge branch 'use-pkgname-to-search-for-saved-package-info' of https://github.com/maximbaz/yay into maximbaz-use-pkgname-to-search-for-saved-package-info

This commit is contained in:
Jguer 2017-06-14 08:47:38 +01:00
commit 7d915b14a2

View File

@ -119,9 +119,9 @@ func CheckUpdates(foreign map[string]alpm.Package) (toUpdate []string) {
return return
} }
func inStore(url string) *Info { func inStore(pkgName string) *Info {
for i, e := range savedInfo { for i, e := range savedInfo {
if url == e.URL { if pkgName == e.Package {
return &savedInfo[i] return &savedInfo[i]
} }
} }
@ -156,7 +156,7 @@ func BranchInfo(pkgName string, owner string, repo string) (err error) {
_ = json.NewDecoder(r.Body).Decode(&newRepo) _ = json.NewDecoder(r.Body).Decode(&newRepo)
packinfo := inStore(url) packinfo := inStore(pkgName)
for _, e := range newRepo { for _, e := range newRepo {
if e.Name == "master" { if e.Name == "master" {