File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed
Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -503,8 +503,10 @@ export class CliRenderer extends EventEmitter implements RenderContext {
503503 this . stdout = stdout
504504 this . realStdoutWrite = stdout . write
505505 this . lib = lib
506- this . _terminalWidth = stdout . columns ?? width
507- this . _terminalHeight = stdout . rows ?? height
506+ // In Bun compiled binaries, tty streams may report columns/rows as 0 even when isTTY is true.
507+ // Treat non-positive values as invalid and fall back to the renderer's initial dimensions.
508+ this . _terminalWidth = typeof stdout . columns === "number" && stdout . columns > 0 ? stdout . columns : width
509+ this . _terminalHeight = typeof stdout . rows === "number" && stdout . rows > 0 ? stdout . rows : height
508510 this . width = width
509511 this . height = height
510512 this . _useThread = config . useThread === undefined ? false : config . useThread
You can’t perform that action at this time.
0 commit comments