Closed olivroy closed 1 year ago
Thanks, makes sense. Would you like to submit a PR? (No pressure at all. :)) Potentially this needs to be fixed in the r-hub/pkgsearch package.
I don't mind taking a look.
However, there are no tests in pak for pkg_search()
.
How would you create them? I could try to fix my use case, but I don't know exactly what it is supposed to do in all other cases
Thanks
Turns out it was pretty simple (if we don't mind overriding the metadata) for the print method (only present in pak, not in pkgsearch)
Hello,
This issue is very minor and possibly not very important.. When not many results are returned from
pkg_search()
, we still get hits 1-10 even if there are less than 10 hits.Created on 2023-06-13 with reprex v2.0.2
Possibly, these lines could be changed.
https://github.com/r-lib/pak/blob/75586c1e95a73fa8628767bcba372b4c16d82ae6/R/search.R#L56 https://github.com/r-lib/pak/blob/75586c1e95a73fa8628767bcba372b4c16d82ae6/R/search.R#L57
Maybe something like:
instead.
It is fine when there are more results though and definitely not a priority
Created on 2023-06-13 with reprex v2.0.2