Fix cmdline runner when stdout doesn't have columns/rows attributes (#3156)

This commit is contained in:
Hood Chatham 2022-09-28 18:41:20 -07:00 committed by GitHub
parent 8f8b107415
commit 5f643fffb5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View File

@ -203,8 +203,8 @@ async function main() {
from js.process import stdout
import os
def get_terminal_size(fallback=(80, 24)):
columns = stdout.columns
rows = stdout.rows
columns = getattr(stdout, "columns", None)
rows = getattr(stdout, "rows", None)
if columns is None:
columns = fallback[0]
if rows is None: