diff --git a/bin/main.ml b/bin/main.ml index 8abea47d3b2..438fc4698a6 100644 --- a/bin/main.ml +++ b/bin/main.ml @@ -169,15 +169,19 @@ let default = ; `Blocks Common.help_secs ]) +let error_exit () = + prerr_endline "DUNE BUILD FAILED"; + exit 1 let main () = Colors.setup_err_formatter_colors (); try match Term.eval_choice default all ~catch:false with - | `Error _ -> exit 1 + | `Error _ -> + error_exit () | _ -> exit 0 with - | Fiber.Never -> exit 1 + | Fiber.Never -> error_exit () | exn -> let exn = Exn_with_backtrace.capture exn in Report_error.report exn; - exit 1 + error_exit () diff --git a/src/scheduler.ml b/src/scheduler.ml index 7c6091e0cae..5c78ec9d95b 100644 --- a/src/scheduler.ml +++ b/src/scheduler.ml @@ -739,6 +739,7 @@ let poll ?log ?config ~once ~finally () = Exit in let wait msg = + Format.fprintf Format.err_formatter "@.DUNE Finish building@."; let old_generator = Console.get_status_line_generator () in set_status_line_generator (fun () -> @@ -750,6 +751,7 @@ let poll ?log ?config ~once ~finally () = res in let rec loop () = + Format.fprintf Format.err_formatter "@.DUNE Start building@."; let res = Run_once.run_and_cleanup t once in finally (); match res with