Skip to content

Commit d35aff2

Browse files
committed
Fixed issue where Cmd.ppaged() was not writing to the passed in destination.
1 parent 4b71f09 commit d35aff2

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

CHANGELOG.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +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.
4+
* Fixed issue where `Cmd.ppaged()` was not writing to the passed in destination.
55

66
## 2.5.6 (November 14, 2024)
77
* Bug Fixes

cmd2/cmd2.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1436,7 +1436,7 @@ def ppaged(self, msg: Any, *, end: str = '\n', chop: bool = False, dest: Optiona
14361436
# Prevent KeyboardInterrupts while in the pager. The pager application will
14371437
# still receive the SIGINT since it is in the same process group as us.
14381438
with self.sigint_protection:
1439-
pipe_proc = subprocess.Popen(pager, shell=True, stdin=subprocess.PIPE)
1439+
pipe_proc = subprocess.Popen(pager, shell=True, stdin=subprocess.PIPE, stdout=dest)
14401440
pipe_proc.communicate(msg_str.encode('utf-8', 'replace'))
14411441
else:
14421442
ansi.style_aware_write(dest, f'{msg_str}{end}')

0 commit comments

Comments
 (0)