From f5bc31da2a84b81fef5da8a59da66a2386adbea6 Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Mon, 12 Feb 2018 14:45:19 +0200 Subject: Make sure operation failure diagnostics is printed for pre/post-operations --- build2/b.cxx | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) (limited to 'build2/b.cxx') diff --git a/build2/b.cxx b/build2/b.cxx index b88fd5e..b0a9abf 100644 --- a/build2/b.cxx +++ b/build2/b.cxx @@ -1246,12 +1246,13 @@ main (int argc, char* argv[]) { result_printer p (tgs); + uint16_t diag (ops.structured_result () ? 0 : 1); if (mif->match != nullptr) - mif->match (mparams, a, tgs, true /* quiet */); + mif->match (mparams, a, tgs, diag); if (mif->execute != nullptr && !ops.match_only ()) - mif->execute (mparams, a, tgs, true /* quiet */); + mif->execute (mparams, a, tgs, diag); } if (mif->operation_post != nullptr) @@ -1269,12 +1270,13 @@ main (int argc, char* argv[]) { result_printer p (tgs); + uint16_t diag (ops.structured_result () ? 0 : 2); if (mif->match != nullptr) - mif->match (mparams, a, tgs, ops.structured_result () /*quiet*/); + mif->match (mparams, a, tgs, diag); if (mif->execute != nullptr && !ops.match_only ()) - mif->execute (mparams, a, tgs, ops.structured_result () /*quiet*/); + mif->execute (mparams, a, tgs, diag); } if (post_oid != 0) @@ -1293,12 +1295,13 @@ main (int argc, char* argv[]) { result_printer p (tgs); + uint16_t diag (ops.structured_result () ? 0 : 1); if (mif->match != nullptr) - mif->match (mparams, a, tgs, true /* quiet */); + mif->match (mparams, a, tgs, diag); if (mif->execute != nullptr && !ops.match_only ()) - mif->execute (mparams, a, tgs, true /* quiet */); + mif->execute (mparams, a, tgs, diag); } if (mif->operation_post != nullptr) -- cgit v1.1