Skip to content

Commit 61efc25

Browse files
committed
Fix buffering bug
1 parent 19f5ac3 commit 61efc25

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/click/_termui_impl.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -395,6 +395,7 @@ def get_pager_file(color=None):
395395
# wrap in a text stream
396396
stream = MaybeStripAnsi(stream, color=color, encoding=encoding)
397397
yield stream
398+
stream.flush()
398399

399400

400401
@contextlib.contextmanager
@@ -458,7 +459,7 @@ def _tempfilepager(cmd, color=None):
458459
def _nullpager(stream, color=None):
459460
"""Simply print unformatted text. This is the ultimate fallback."""
460461
encoding = get_best_encoding(stream)
461-
return stream, encoding, color
462+
yield stream, encoding, color
462463

463464

464465
class Editor:

0 commit comments

Comments
 (0)