diff options
author | Boris Kolpackov <boris@codesynthesis.com> | 2024-10-16 14:05:03 +0200 |
---|---|---|
committer | Boris Kolpackov <boris@codesynthesis.com> | 2024-10-16 14:05:03 +0200 |
commit | 9cf2dbda0d6a7006a5425c19973bb0a7286392f6 (patch) | |
tree | a32409aa36827c574898f89f196447d801dae6a1 /libbuild2/operation.cxx | |
parent | 881b5b560d055bfb762f17cffb82b22961f36ad2 (diff) |
Stop on first error for install and uninstall operations
Diffstat (limited to 'libbuild2/operation.cxx')
-rw-r--r-- | libbuild2/operation.cxx | 20 |
1 files changed, 16 insertions, 4 deletions
diff --git a/libbuild2/operation.cxx b/libbuild2/operation.cxx index 93db206..76118ea 100644 --- a/libbuild2/operation.cxx +++ b/libbuild2/operation.cxx @@ -664,6 +664,15 @@ namespace build2 default: assert (false); // Not supported. } + // Override the keep_going flag if requested by the operation. + // + auto kgg = make_guard ([&ctx, o = ctx.keep_going] () + { + ctx.keep_going = o; + }); + if (!ctx.current_inner_oif->keep_going) + ctx.keep_going = false; + // Set the dry-run flag. // ctx.dry_run = ctx.dry_run_option; @@ -819,7 +828,7 @@ namespace build2 // ctx.dry_run = false; - // Restore original scheduler settings. + // Restore original scheduler and keep_going settings. } // Print skip count if not zero. Note that we print it regardless of the @@ -1500,7 +1509,8 @@ namespace build2 "", "", execution_mode::first, - 1 /* concurrency */, + 1 /* concurrency */, + true /* keep_going */, nullptr, nullptr, nullptr, @@ -1528,7 +1538,8 @@ namespace build2 "updated", "is up to date", execution_mode::first, - 1 /* concurrency */, + 1 /* concurrency */, + true /* keep_going */, nullptr, nullptr, nullptr, @@ -1546,7 +1557,8 @@ namespace build2 "cleaned", "is clean", execution_mode::last, - 1 /* concurrency */, + 1 /* concurrency */, + true /* keep_going */, nullptr, nullptr, nullptr, |