From d5db87fd82315467a909db3cfdf617529613b97c Mon Sep 17 00:00:00 2001 From: Jaap Frolich Date: Sun, 19 Apr 2026 14:15:13 +0200 Subject: [PATCH] Rewatch: print 'Finished compilation' in watch plain_output mode When stdout isn't a TTY during `rewatch watch`, full rebuilds previously produced no completion message. Emit a plain 'Finished compilation' line so parent processes and non-TTY consumers can observe when a rebuild finishes. --- rewatch/src/watcher.rs | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/rewatch/src/watcher.rs b/rewatch/src/watcher.rs index d6aba426f9..69ad01ef61 100644 --- a/rewatch/src/watcher.rs +++ b/rewatch/src/watcher.rs @@ -452,13 +452,17 @@ async fn async_watch( build::write_build_ninja(&build_state); let timing_total_elapsed = timing_total.elapsed(); - if !plain_output && show_progress { - println!( - "\n{}{}Finished compilation in {:.2}s\n", - LINE_CLEAR, - SPARKLES, - timing_total_elapsed.as_secs_f64() - ); + if show_progress { + if plain_output { + println!("Finished compilation") + } else { + println!( + "\n{}{}Finished compilation in {:.2}s\n", + LINE_CLEAR, + SPARKLES, + timing_total_elapsed.as_secs_f64() + ); + } } needs_compile_type = CompileType::None; initial_build = false;