Skip to content

Commit

Permalink
(chocolateyGH-661) allow local only without sources
Browse files Browse the repository at this point in the history
When no sources are active and someone is searching a local source,
allow that to continue without throwing an error. This will allow the
sources to be configured to the local source a littler further in and
then return results instead of throwing an error.
  • Loading branch information
ferventcoder authored and galeksandrp committed Feb 16, 2019
1 parent 572e9d8 commit d006769
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ public void list_noop(ChocolateyConfiguration config)

public IEnumerable<PackageResult> list_run(ChocolateyConfiguration config)
{
if (string.IsNullOrWhiteSpace(config.Sources))
if (string.IsNullOrWhiteSpace(config.Sources) && !config.ListCommand.LocalOnly)
{
this.Log().Error(ChocolateyLoggers.Important, @"Unable to search for packages when there are no sources enabled for
packages and none were passed as arguments.");
Expand Down

0 comments on commit d006769

Please sign in to comment.