Skip to content

Commit

Permalink
Fixed issue where Cmd.ppaged() was not writing to the passed in desti…
Browse files Browse the repository at this point in the history
…nation.
  • Loading branch information
kmvanbrunt committed Nov 22, 2024
1 parent fb5b7b0 commit 58dac5b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
## 2.5.7 (TBD)
* Bug Fixes
* Fixed issue where argument parsers for overridden commands were not being created.
* Fixed terminal check in `Cmd.ppaged()` to use correct output stream.
* Fixed issue where `Cmd.ppaged()` was not writing to the passed in destination.

## 2.5.6 (November 14, 2024)
* Bug Fixes
Expand Down
2 changes: 1 addition & 1 deletion cmd2/cmd2.py
Original file line number Diff line number Diff line change
Expand Up @@ -1436,7 +1436,7 @@ def ppaged(self, msg: Any, *, end: str = '\n', chop: bool = False, dest: Optiona
# Prevent KeyboardInterrupts while in the pager. The pager application will
# still receive the SIGINT since it is in the same process group as us.
with self.sigint_protection:
pipe_proc = subprocess.Popen(pager, shell=True, stdin=subprocess.PIPE)
pipe_proc = subprocess.Popen(pager, shell=True, stdin=subprocess.PIPE, stdout=dest)
pipe_proc.communicate(msg_str.encode('utf-8', 'replace'))
else:
ansi.style_aware_write(dest, f'{msg_str}{end}')
Expand Down

0 comments on commit 58dac5b

Please sign in to comment.