Skip to content

Commit e9d8d48

Browse files
committed
fix(hook): mark progress-bar stderr writes as intentional
Pre-push logger-guard surfaced rich-progress.mts:315/320 stderr.write calls. They're intentional — the progress bar uses \r-based line replacement, which logger.error() can't provide. Adds the `socket-hook: allow console` markers. Pre-existing usage; surfaced when the guard reran after the prior fix(lint) commit.
1 parent bcd791a commit e9d8d48

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

packages/cli/src/utils/terminal/rich-progress.mts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -312,12 +312,14 @@ export class FileProgress {
312312
this.total > 0 ? Math.floor((this.processed / this.total) * 100) : 0
313313
const elapsed = ((Date.now() - this.startTime) / 1000).toFixed(1)
314314

315-
process.stderr.write(
315+
// Uses raw stderr.write for \r-based progress redraw — logger
316+
// appends newlines and can't replace the current line.
317+
process.stderr.write( // socket-hook: allow console
316318
`\r${this.operation}: [${this.processed}/${this.total}] ${percentage}% ${colors.gray(`(${elapsed}s)`)} ${colors.cyan(file)}`,
317319
)
318320

319321
if (this.processed === this.total) {
320-
process.stderr.write('\n')
322+
process.stderr.write('\n') // socket-hook: allow console
321323
}
322324
}
323325
}

0 commit comments

Comments
 (0)