diff --git a/src/chocolatey/infrastructure.app/commands/ChocolateyListCommand.cs b/src/chocolatey/infrastructure.app/commands/ChocolateyListCommand.cs index 426c2ee529..d4fcfce81d 100644 --- a/src/chocolatey/infrastructure.app/commands/ChocolateyListCommand.cs +++ b/src/chocolatey/infrastructure.app/commands/ChocolateyListCommand.cs @@ -147,19 +147,22 @@ public virtual void handle_additional_argument_parsing(IList unparsedArg public virtual void handle_validation(ChocolateyConfiguration configuration) { //Validate a package has been passed to info. - if(configuration.CommandName == "info" && string.IsNullOrWhiteSpace(configuration.Input)) + if(configuration.CommandName == "info") { - throw new ApplicationException(@"A single package id is required to run the info again."); - } + + if (string.IsNullOrWhiteSpace(configuration.Input)) + { + throw new ApplicationException(@"A single package id is required to run the info again."); + } - //Validate only a single package has been passed to info - //TODO: Provide ability to get info on a list of packages - string[] input = configuration.Input.Split(' '); - if (input.Count() > 1) - { - throw new ApplicationException(@"This command only accepts a single package id."); + //Validate only a single package has been passed to info + //TODO: Provide ability to get info on a list of packages + string[] input = configuration.Input.Split(' '); + if (input.Count() > 1) + { + throw new ApplicationException(@"This command only accepts a single package id."); + } } - if (!string.IsNullOrWhiteSpace(configuration.SourceCommand.Username) && string.IsNullOrWhiteSpace(configuration.SourceCommand.Password)) { @@ -289,13 +292,7 @@ public virtual void noop(ChocolateyConfiguration configuration) public virtual void run(ChocolateyConfiguration configuration) { - var logger = ChocolateyLoggers.LogFileOnly; var packageResults = _packageService.list_run(configuration).ToList(); - - if (configuration.RegularOutput) - { - logger = ChocolateyLoggers.Normal; - } log_deprecation_warning(configuration);