From acbe8156d6f732fd4f93f58e76349157dd24a463 Mon Sep 17 00:00:00 2001 From: Gary Ewan Park <gep13@gep13.co.uk> Date: Mon, 1 Feb 2021 08:02:00 +0000 Subject: [PATCH] (GH-807) Ensure that Local Only flag is false When searching for packages from a remote source, ensure that the Local Only flag is always set to false, otherwise, Chocolatey will return a list of local packages, rather than those from the remote source. This was discovered when clicking on a remote source while the list of locally installed packages was still being populated. The search of the remote source was still using some of the configuration from the query of the locally installed packages. --- .../ChocolateyGui.Common.Windows/Services/ChocolateyService.cs | 1 + 1 file changed, 1 insertion(+) diff --git a/Source/ChocolateyGui.Common.Windows/Services/ChocolateyService.cs b/Source/ChocolateyGui.Common.Windows/Services/ChocolateyService.cs index 290a44ade..3835e2083 100644 --- a/Source/ChocolateyGui.Common.Windows/Services/ChocolateyService.cs +++ b/Source/ChocolateyGui.Common.Windows/Services/ChocolateyService.cs @@ -215,6 +215,7 @@ public async Task<PackageResults> Search(string query, PackageSearchOptions opti config.ListCommand.Page = options.CurrentPage; config.ListCommand.PageSize = options.PageSize; config.Prerelease = options.IncludePrerelease; + config.ListCommand.LocalOnly = false; if (string.IsNullOrWhiteSpace(query) || !string.IsNullOrWhiteSpace(options.SortColumn)) { config.ListCommand.OrderByPopularity = string.IsNullOrWhiteSpace(options.SortColumn)