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 committed Jan 17, 2019
1 parent f871570 commit ed110e9
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 ed110e9

Please sign in to comment.