From 68632db6effa65c8a7aad3e0cf3056813fe7f225 Mon Sep 17 00:00:00 2001 From: iamdoubz <> Date: Wed, 15 Jul 2026 21:45:46 -0500 Subject: [PATCH] =?UTF-8?q?fix(bench):=20named=20Set-Content=20params=20?= =?UTF-8?q?=E2=80=94=20positional+NoNewline=20silently=20wrote=20nothing?= =?UTF-8?q?=20on=20PS=205.1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- scripts/bench/fetch-corpus.ps1 | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/scripts/bench/fetch-corpus.ps1 b/scripts/bench/fetch-corpus.ps1 index 0588775..09ff8ba 100644 --- a/scripts/bench/fetch-corpus.ps1 +++ b/scripts/bench/fetch-corpus.ps1 @@ -39,6 +39,9 @@ foreach ($f in $flacs) { $trans = Get-ChildItem -Path $f.DirectoryName -Filter *.trans.txt | Select-Object -First 1 $line = Get-Content $trans.FullName | Where-Object { $_.StartsWith("$name ") } | Select-Object -First 1 if (-not $line) { throw "no reference line for $name" } - Set-Content -Encoding utf8 -NoNewline (Join-Path $corpus "$name.txt") $line.Substring($name.Length + 1) + # Named parameters on purpose: positional binding alongside -NoNewline + # silently wrote nothing under Windows PowerShell 5.1 (found the hard way); + # the WER normalizer doesn't care about a trailing newline. + Set-Content -Path (Join-Path $corpus "$name.txt") -Value $line.Substring($name.Length + 1) -Encoding utf8 } Write-Output "staged $($flacs.Count) utterances in $corpus"