From 3bc0fc4c4496c345c79734dcd6dc56d44119aebf Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Tue, 8 Nov 2022 10:34:22 +0200 Subject: Make process exit diagnostics consistent In particular, we now always print error message on non-0 exit except in cases where such exit is ignored. --- libbuild2/diagnostics.cxx | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-) (limited to 'libbuild2/diagnostics.cxx') diff --git a/libbuild2/diagnostics.cxx b/libbuild2/diagnostics.cxx index 9433cd8..110641a 100644 --- a/libbuild2/diagnostics.cxx +++ b/libbuild2/diagnostics.cxx @@ -347,8 +347,8 @@ namespace build2 close (const char* const* args, const process_exit& pe, uint16_t v, - const location& loc, - bool omit_normall) + bool omit_normal, + const location& loc) { tracer trace ("diag_buffer::close"); @@ -363,19 +363,12 @@ namespace build2 { // Note: see similar code in run_finish_impl(). // - if (omit_normall && pe.normal ()) + if (omit_normal && pe.normal ()) { l4 ([&]{trace << "process " << args[0] << " " << pe;}); } else { - // It's unclear whether we should print this only if printing the - // command line (we could also do things differently for - // normal/abnormal exit). Let's print this always and see how it - // wears. - // - // Note: make sure keep the above trace is not printing. - // dr << error (loc) << "process " << args[0] << " " << pe; if (verb >= 1 && verb <= v) -- cgit v1.1