summaryrefslogtreecommitdiff
path: root/cli/util/file_watcher.rs
diff options
context:
space:
mode:
Diffstat (limited to 'cli/util/file_watcher.rs')
-rw-r--r--cli/util/file_watcher.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/cli/util/file_watcher.rs b/cli/util/file_watcher.rs
index 5158437a0..b85df3bd6 100644
--- a/cli/util/file_watcher.rs
+++ b/cli/util/file_watcher.rs
@@ -119,13 +119,13 @@ where
pub struct PrintConfig {
/// printing watcher status to terminal.
pub job_name: String,
- /// determine whether to clear the terminal screen
+ /// determine whether to clear the terminal screen; applicable to TTY environments only.
pub clear_screen: bool,
}
fn create_print_after_restart_fn(clear_screen: bool) -> impl Fn() {
move || {
- if clear_screen {
+ if clear_screen && atty::is(atty::Stream::Stderr) {
eprint!("{}", CLEAR_SCREEN);
}
info!(