Fix paging not happening when stdout is interactive but stdin is not

This commit is contained in:
Nigecat 2023-05-22 11:10:12 +10:00 committed by Martin Nordholts
parent b420c42aff
commit 149dec6953
1 changed files with 1 additions and 1 deletions

View File

@ -104,7 +104,7 @@ impl App {
// If we are reading from stdin, only enable paging if we write to an
// interactive terminal and if we do not *read* from an interactive
// terminal.
if self.interactive_output && std::io::stdin().is_terminal() {
if self.interactive_output && !std::io::stdin().is_terminal() {
PagingMode::QuitIfOneScreen
} else {
PagingMode::Never