Skip to content

Commit

Permalink
Fix some minor issues with text report
Browse files Browse the repository at this point in the history
  • Loading branch information
Thomas Démoulins committed Jan 2, 2019
1 parent 9083828 commit 77d3bf2
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions AU/Plugins/Report/text.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ $Title = if ($Params.Title) { $Params.Title } else { 'Update-AUPackages'

#==============================================================================

function title($txt) { "r`n{0}`r`n{1}`r`n" -f $txt,('-'*$txt.Length) }
function title($txt) { "`r`n{0}`r`n{1}`r`n" -f $txt,('-'*$txt.Length) }
function indent($txt, $level=4) { $txt -split "`n" | % { ' '*$level + $_ } }

$now = $Info.startTime.ToUniversalTime().ToString('yyyy-MM-dd HH:mm')
Expand Down Expand Up @@ -31,15 +31,15 @@ if ($Info.pushed) {
$Info.result.pushed | select 'Name', 'Updated', 'Pushed', 'RemoteVersion', 'NuspecVersion' | ft | Out-String | set r
indent $r 2

$ok | % { $_.Name; indent $_.Result; "" }
$Info.result.pushed | % { $_.Name; indent $_.Result; "" }
}

if ($Info.error_count.total) {
title Errors
$Info.result.errors | select 'Name', 'NuspecVersion', 'Error' | ft | Out-String | set r
indent $r 2

$Info.result.errors | % { $_.Name; ident $_.Error; "" }
$Info.result.errors | % { $_.Name; indent $_.Error; "" }
}


Expand Down

0 comments on commit 77d3bf2

Please sign in to comment.