mirror of
https://github.com/Jguer/yay.git
synced 2024-11-06 09:07:21 +01:00
fix(aur): -Ss fails on multi arg if no results. (#1716)
This fixes #1674. If search command included multiple packages and no results were found in AUR, response from `query.queryAUR` was returned as nil slice instead of non-nil empty slice and as nil slice is treated during subsequent validation in `query.SourceQueryBuilder.Results` as meaning that searching in AUR was not executed, command was failing. Now empty non-nil slice is returned if results were not found.
This commit is contained in:
parent
83a257b16b
commit
b52e3cf0d2
@ -188,10 +188,7 @@ func queryAUR(ctx context.Context, aurClient *aur.Client, pkgS []string, searchB
|
|||||||
return r, err
|
return r, err
|
||||||
}
|
}
|
||||||
|
|
||||||
var (
|
aq := make(aurQuery, 0, len(r))
|
||||||
aq aurQuery
|
|
||||||
n int
|
|
||||||
)
|
|
||||||
|
|
||||||
for i := range r {
|
for i := range r {
|
||||||
match := true
|
match := true
|
||||||
@ -213,8 +210,6 @@ func queryAUR(ctx context.Context, aurClient *aur.Client, pkgS []string, searchB
|
|||||||
}
|
}
|
||||||
|
|
||||||
if match {
|
if match {
|
||||||
n++
|
|
||||||
|
|
||||||
aq = append(aq, r[i])
|
aq = append(aq, r[i])
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user