Skip to content

Commit

Permalink
(GH-1004) Ensure choco info returns results
Browse files Browse the repository at this point in the history
Use FindPackagesById to return results for info and exact id searches.
  • Loading branch information
ferventcoder committed May 1, 2017
1 parent cf6d1e6 commit 719d46a
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/chocolatey/infrastructure.app/nuget/NugetList.cs
Original file line number Diff line number Diff line change
Expand Up @@ -60,15 +60,14 @@ private static IQueryable<IPackage> execute_package_search(ChocolateyConfigurati

IQueryable<IPackage> results = packageRepository.Search(searchTermLower, configuration.Prerelease);


if (configuration.ListCommand.Page.HasValue)
{
results = results.Skip(configuration.ListCommand.PageSize * configuration.ListCommand.Page.Value).Take(configuration.ListCommand.PageSize);
}

if (configuration.ListCommand.Exact)
{
results = results.Where(p => p.Id.ToLower() == searchTermLower);
results = packageRepository.FindPackagesById(searchTermLower).AsQueryable();
}

if (configuration.ListCommand.ByIdOnly)
Expand Down

0 comments on commit 719d46a

Please sign in to comment.