fix: avoid passing infinite width to cli-truncate when streaming lifecycle output (#12750)

* fix: avoid passing infinite width to cli-truncate when streaming lifecycle output

cli-truncate 6.1.0 rejects a non-finite width, which crashed the reporter
when streaming lifecycle script output (streamLifecycleOutput passes Infinity
to mean "do not truncate").

* chore: drop changeset

The broken build this fixes was never released, so no release note is needed.
This commit is contained in:
Zoltan Kochan
2026-07-01 09:15:29 +02:00
committed by GitHub
parent b6d29d212d
commit 397f9783f4

View File

@@ -277,6 +277,9 @@ function formatLine (maxWidth: number, logObj: LifecycleLog): string {
function cutLine (line: string | undefined, maxLength: number): string {
if (!line) return ''
// Streamed lifecycle output is printed in full (maxLength is Infinity).
// cli-truncate rejects a non-finite width, so skip truncation in that case.
if (!Number.isFinite(maxLength)) return line
return cliTruncate(line, maxLength)
}