build.ps1: emit plain strings instead of Format-Table objects
Format-Table writes format-descriptor objects, not text, so piping the script through Select-Object or Out-String broke the stream and made the script exit 1 after a successful build. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
1 parent
4909edee2d
commit
77f88afd7a
1 file changed
+4
-1
+4
-1
@@ -61,4 +61,7 @@ Get-ChildItem $OutDir -File |
|
|||||||
Set-Content -Path (Join-Path $OutDir "SHA256SUMS") -Encoding utf8
|
Set-Content -Path (Join-Path $OutDir "SHA256SUMS") -Encoding utf8
|
||||||
|
|
||||||
Write-Host ""
|
Write-Host ""
|
||||||
Get-ChildItem $OutDir | Format-Table Name, @{N = "MB"; E = { [math]::Round($_.Length / 1MB, 1) } }
|
# Emit plain strings, not format objects: Format-Table output breaks if the
|
||||||
|
# caller pipes this script through Select-Object or Out-String.
|
||||||
|
Get-ChildItem $OutDir -File |
|
||||||
|
ForEach-Object { Write-Host ("{0,-40} {1,6:N1} MB" -f $_.Name, ($_.Length / 1MB)) }
|
||||||
Reference in new issue
Block a user