From dbe8d3fcdc9ae34edb95680565f4774174e6f7e2 Mon Sep 17 00:00:00 2001 From: Yuya Nishihara Date: Mon, 12 Jun 2023 21:37:17 +0900 Subject: [PATCH] ui: on progress output, also take pager status into account --- src/ui.rs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/ui.rs b/src/ui.rs index da01b2d51..0f3a57b26 100644 --- a/src/ui.rs +++ b/src/ui.rs @@ -188,7 +188,10 @@ impl Ui { /// Whether continuous feedback should be displayed for long-running /// operations pub fn use_progress_indicator(&self) -> bool { - self.progress_indicator && io::stdout().is_tty() + match &self.output { + UiOutput::Terminal { stdout, .. } => self.progress_indicator && stdout.is_tty(), + UiOutput::Paged { .. } => false, + } } pub fn write(&mut self, text: &str) -> io::Result<()> {