Skip to content

Commit 99ba829

Browse files
committed
Fixed terminal check in Cmd.ppaged() to use correct output stream.
1 parent 475b28c commit 99ba829

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
## 2.5.7 (TBD)
22
* Bug Fixes
33
* Fixed issue where argument parsers for overridden commands were not being created.
4+
* Fixed terminal check in `Cmd.ppaged()` to use correct output stream.
45

56
## 2.5.6 (November 14, 2024)
67
* Bug Fixes

cmd2/cmd2.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1419,7 +1419,7 @@ def ppaged(self, msg: Any, *, end: str = '\n', chop: bool = False, dest: Optiona
14191419
# Don't try to use the pager when being run by a continuous integration system like Jenkins + pexpect.
14201420
functional_terminal = False
14211421

1422-
if self.stdin.isatty() and self.stdout.isatty():
1422+
if self.stdin.isatty() and dest.isatty():
14231423
if sys.platform.startswith('win') or os.environ.get('TERM') is not None:
14241424
functional_terminal = True
14251425

0 commit comments

Comments
 (0)