Skip to content

Commit f61de1a

Browse files
committed
(#886) Debug log Package configuration
When using a packages.config file, output the evaluated package configuration to the debug stream so that it is available for troubleshooting (and our Pester tests). Also update the checksum type logic to store in the right property.
1 parent 63c8cbd commit f61de1a

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/chocolatey/infrastructure.app/services/ChocolateyPackageService.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -771,7 +771,7 @@ private IEnumerable<ChocolateyConfiguration> get_packages_from_config(string pac
771771
}
772772
packageConfig.DownloadChecksum = string.IsNullOrWhiteSpace(pkgSettings.DownloadChecksum) ? packageConfig.DownloadChecksum : pkgSettings.DownloadChecksum;
773773
packageConfig.DownloadChecksum64 = string.IsNullOrWhiteSpace(pkgSettings.DownloadChecksum64) ? packageConfig.DownloadChecksum64 : pkgSettings.DownloadChecksum64;
774-
packageConfig.DownloadChecksum = string.IsNullOrWhiteSpace(pkgSettings.DownloadChecksumType) ? packageConfig.DownloadChecksumType : pkgSettings.DownloadChecksumType;
774+
packageConfig.DownloadChecksumType = string.IsNullOrWhiteSpace(pkgSettings.DownloadChecksumType) ? packageConfig.DownloadChecksumType : pkgSettings.DownloadChecksumType;
775775
packageConfig.DownloadChecksumType64 = string.IsNullOrWhiteSpace(pkgSettings.DownloadChecksumType64) ? packageConfig.DownloadChecksumType : pkgSettings.DownloadChecksumType64;
776776
if (pkgSettings.IgnorePackageExitCodes) packageConfig.Features.UsePackageExitCodes = false;
777777
if (pkgSettings.UsePackageExitCodes) packageConfig.Features.UsePackageExitCodes = true;
@@ -793,6 +793,7 @@ private IEnumerable<ChocolateyConfiguration> get_packages_from_config(string pac
793793

794794
this.Log().Info(ChocolateyLoggers.Important, @"{0}".format_with(packageConfig.PackageNames));
795795
packageConfigs.Add(packageConfig);
796+
this.Log().Debug(() => "Package Configuration: {0}".format_with(packageConfig.ToString()));
796797
}
797798
}
798799

0 commit comments

Comments
 (0)