forked from chocolatey/choco
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
(chocolateyGH-132) Move "LogOutput" to the configuration as "Quiet" s…
…o it works the way others do...
- Loading branch information
Showing
10 changed files
with
86 additions
and
78 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -71,30 +71,29 @@ public void list_noop(ChocolateyConfiguration config) | |
)); | ||
} | ||
|
||
public IEnumerable<PackageResult> list_run(ChocolateyConfiguration config, bool logResults) | ||
public IEnumerable<PackageResult> list_run(ChocolateyConfiguration config) | ||
{ | ||
foreach (var package in NugetList.GetPackages(config, _nugetLogger)) | ||
int count = 0; | ||
foreach (var pkg in NugetList.GetPackages(config, _nugetLogger)) | ||
This comment has been minimized.
Sorry, something went wrong. |
||
{ | ||
var pkg = package; // for lamda access | ||
if (logResults) | ||
var package = pkg; // for lamda access | ||
if (!config.Quiet) | ||
{ | ||
if (config.RegularOutput) | ||
{ | ||
this.Log().Info(config.Verbose ? ChocolateyLoggers.Important : ChocolateyLoggers.Normal, () => "{0} {1}".format_with(pkg.Id, pkg.Version.to_string())); | ||
if (config.Verbose) this.Log().Info(() => " {0}{1} Description: {2}{1} Tags: {3}{1} Number of Downloads: {4}{1}".format_with(pkg.Title.escape_curly_braces(), Environment.NewLine, pkg.Description.escape_curly_braces(), pkg.Tags.escape_curly_braces(), pkg.DownloadCount <= 0 ? "n/a" : pkg.DownloadCount.to_string())); | ||
// Maintainer(s):{3}{1} | pkg.Owners.join(", ") - null at the moment | ||
} | ||
else | ||
{ | ||
this.Log().Info(config.Verbose ? ChocolateyLoggers.Important : ChocolateyLoggers.Normal, () => "{0}|{1}".format_with(pkg.Id, pkg.Version.to_string())); | ||
} | ||
this.Log().Info(config.Verbose ? ChocolateyLoggers.Important : ChocolateyLoggers.Normal, () => "{0} {1}".format_with(package.Id, package.Version.to_string())); | ||
if (config.RegularOutput && config.Verbose) this.Log().Info(() => " {0}{1} Description: {2}{1} Tags: {3}{1} Number of Downloads: {4}{1}".format_with(package.Title.escape_curly_braces(), Environment.NewLine, package.Description.escape_curly_braces(), package.Tags.escape_curly_braces(), package.DownloadCount <= 0 ? "n/a" : package.DownloadCount.to_string())); | ||
This comment has been minimized.
Sorry, something went wrong.
This comment has been minimized.
Sorry, something went wrong.
Jaykul
Author
Owner
|
||
} | ||
else | ||
{ | ||
this.Log().Debug(() => "{0} {1}".format_with(pkg.Id, pkg.Version.to_string())); | ||
this.Log().Debug(() => "{0} {1}".format_with(package.Id, package.Version.to_string())); | ||
} | ||
count++; | ||
|
||
yield return new PackageResult(pkg, null, config.Sources); | ||
yield return new PackageResult(package, null, config.Sources); | ||
} | ||
|
||
if (config.RegularOutput) | ||
{ | ||
this.Log().Warn(() => @"{0} packages {1}.".format_with(count, config.ListCommand.LocalOnly ? "installed" : "found")); | ||
} | ||
} | ||
|
||
|
@@ -890,8 +889,9 @@ private void set_package_names_if_all_is_specified(ChocolateyConfiguration confi | |
config.PackageNames = string.Empty; | ||
var input = config.Input; | ||
config.Input = string.Empty; | ||
|
||
config.PackageNames = list_run(config, false).Select(p => p.Name).@join(ApplicationParameters.PackageNamesSeparator); | ||
config.Quiet = true; | ||
|
||
config.PackageNames = list_run(config).Select(p => p.Name).@join(ApplicationParameters.PackageNamesSeparator); | ||
config.Input = input; | ||
config.Noop = noop; | ||
config.Prerelease = pre; | ||
|
Hey, see -- I told you I switched the package/pkg