diff --git a/src/chocolatey/infrastructure.app/services/ChocolateyPackageService.cs b/src/chocolatey/infrastructure.app/services/ChocolateyPackageService.cs index 5933f324ab..09ae129488 100644 --- a/src/chocolatey/infrastructure.app/services/ChocolateyPackageService.cs +++ b/src/chocolatey/infrastructure.app/services/ChocolateyPackageService.cs @@ -793,7 +793,7 @@ private IEnumerable get_packages_from_config(string pac this.Log().Info(ChocolateyLoggers.Important, @"{0}".format_with(packageConfig.PackageNames)); packageConfigs.Add(packageConfig); - this.Log().Debug(() => "Package Configuration: {0}".format_with(packageConfig.ToString())); + this.Log().Debug(() => "Package Configuration Start:{0}{1}{0}Package Configuration End".format_with(System.Environment.NewLine, packageConfig.ToString())); } } diff --git a/tests/chocolatey-tests/commands/choco-install.Tests.ps1 b/tests/chocolatey-tests/commands/choco-install.Tests.ps1 index 79825f92ab..daf7a34e19 100644 --- a/tests/chocolatey-tests/commands/choco-install.Tests.ps1 +++ b/tests/chocolatey-tests/commands/choco-install.Tests.ps1 @@ -247,9 +247,11 @@ Describe "choco install" -Tag Chocolatey, InstallCommand { $Output = Invoke-Choco install $env:CHOCOLATEY_TEST_PACKAGES_PATH\alloptions.packages.config --confirm --verbose --debug # This is based on two observations: The addition explicitly outputs that it's the Package Configuration. - # The configuration output is also about 80 lines. - $StartofPackageConfiguration = [array]::IndexOf($Output.Lines, "Package Configuration: CommandName='install'|") - $PackageConfigurationOutput = $Output.Lines[$StartofPackageConfiguration..($StartofPackageConfiguration+80)] -join [Environment]::NewLine + # The configuration output is about 80 lines. + $StartOfPackageConfiguration = [array]::IndexOf($Output.Lines, "Package Configuration Start:") + $EndOfPackageConfiguration = [array]::IndexOf($Output.Lines, "Package Configuration End") + + $PackageConfigurationOutput = $Output.Lines[$StartofPackageConfiguration..$EndOfPackageConfiguration] -join [Environment]::NewLine } # We are explicitly passing in a bad username and password here.