Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
(NuGet#9) Fix DownloadCount ordering
When Chocolatey is ran with the --order-by-popularity option, the expectation is that the DownloadCount property is pass within the oData query. This is done, however, on further comparison between what is emitted from Chocolatey 1.x, and the new 2.x version, it was found that there was a missing follow up ordering, based on the Id. In addition, the direction of the order for DownloadCount, should be explicit. i.e. rather than adding DownloadCount to the query string, we need to add DownloadCount%20desc,Id (here %20 is the HTML encoded value for a space character). This commit update the orderBy variable to contain the requirement order by value, when DownloadCount is being applied.
- Loading branch information