Skip to content

Commit

Permalink
(#508) Tweak info/verbose list output
Browse files Browse the repository at this point in the history
This makes the info output the same as it was when using NuGet.Core so
as to keep the info output the same as it is with v1.x
  • Loading branch information
TheCakeIsNaOH committed Dec 22, 2022
1 parent ea863fe commit 66e128d
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/chocolatey/infrastructure.app/services/NugetService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,7 @@ public virtual IEnumerable<PackageResult> list_run(ChocolateyConfiguration confi
if (config.Verbose && !config.ListCommand.IdOnly) this.Log().Info(() =>
@" Title: {0} | Published: {1}{2}{3}
Number of Downloads: {4} | Downloads for this version: {5}
Package url: {6}
Package url{6}
Chocolatey Package Source: {7}{8}
Tags: {9}
Software Site: {10}
Expand All @@ -209,12 +209,12 @@ public virtual IEnumerable<PackageResult> list_run(ChocolateyConfiguration confi
package.PackageTestResultStatus,
package.PackageValidationResultDate.GetValueOrDefault().ToString("MMM dd yyyy HH:mm:ss")
),
package.DownloadCount <= 0 ? "n/a" : package.DownloadCount.to_string(),
package.VersionDownloadCount <= 0 ? "n/a" : package.VersionDownloadCount.to_string(),
package.PackageDetailsUrl == null || string.IsNullOrWhiteSpace(package.PackageDetailsUrl.AbsoluteUri) ? "N/A" : package.PackageDetailsUrl.AbsoluteUri,
(package.DownloadCount == null || package.DownloadCount <= 0) ? "n/a" : package.DownloadCount.to_string(),
(package.VersionDownloadCount == null || package.VersionDownloadCount <= 0) ? "n/a" : package.VersionDownloadCount.to_string(),
package.PackageDetailsUrl == null || string.IsNullOrWhiteSpace(package.PackageDetailsUrl.AbsoluteUri) ? string.Empty : " " + package.PackageDetailsUrl.AbsoluteUri,
packageLocalMetadata != null && packageLocalMetadata.PackageSourceUrl != null && !string.IsNullOrWhiteSpace(packageLocalMetadata.PackageSourceUrl.to_string())
? packageLocalMetadata.PackageSourceUrl.to_string()
: "N/A",
: "n/a",
string.IsNullOrWhiteSpace(package.PackageHash) ? string.Empty : "{0} Package Checksum: '{1}' ({2})".format_with(
Environment.NewLine,
package.PackageHash,
Expand Down

0 comments on commit 66e128d

Please sign in to comment.