From 78959b5841facc24fefa0efd87eeca39e85c49b7 Mon Sep 17 00:00:00 2001 From: Alan Hu Date: Tue, 15 Sep 2020 21:31:42 -0400 Subject: [PATCH] =?UTF-8?q?Also=20clear=20status=20line=20in=20case=20of?= =?UTF-8?q?=20error,=20as=20J=C3=A9r=C3=A9mie=20Dimino=20requested?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Alan Hu --- src/dune_engine/scheduler.ml | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/src/dune_engine/scheduler.ml b/src/dune_engine/scheduler.ml index 85a4d4f4a088..5832fd315b83 100644 --- a/src/dune_engine/scheduler.ml +++ b/src/dune_engine/scheduler.ml @@ -705,21 +705,21 @@ end = struct match Fiber.run fiber ~iter with | res -> assert (Event.pending_jobs () = 0); - Console.Status_line.set (Fun.const None); Ok res | exception Abort err -> Error err | exception exn -> Error (Exn (Exn_with_backtrace.capture exn)) let run_and_cleanup t f = let res = run t f in - ( match res with - | Error Files_changed -> - Console.Status_line.set (fun () -> - Some - (Pp.seq - (Pp.tag User_message.Style.Error (Pp.verbatim "Had errors")) - (Pp.verbatim ", killing current build..."))) - | _ -> () ); + Console.Status_line.set + (Fun.const + ( match res with + | Error Files_changed -> + Some + (Pp.seq + (Pp.tag User_message.Style.Error (Pp.verbatim "Had errors")) + (Pp.verbatim ", killing current build...")) + | _ -> None )); match kill_and_wait_for_all_processes t () with | Got_signal -> Error Got_signal | Ok -> res