diff options
author | alois31 <alois1@gmx-topmail.de> | 2024-10-23 15:20:51 +0000 |
---|---|---|
committer | Gerrit Code Review <gerrit@localhost> | 2024-10-23 15:20:51 +0000 |
commit | 2734a9cf94debc6baef4e7d4d9fa28cc28f5b31d (patch) | |
tree | ba6be97cc5ac268941b1c8ac10507786a720357c /src/libmain/shared.cc | |
parent | 5f1344dd8aec59ce654a0fac30b1842e2e68299c (diff) | |
parent | 689eb45630a183f0fbbd8864cb7a3c7cb1704451 (diff) |
* changes:
treewide: make more settings conditionally available
libstore/build: only send overridden settings to the build hook
treewide: consistently mark overridden settings as such
Diffstat (limited to 'src/libmain/shared.cc')
-rw-r--r-- | src/libmain/shared.cc | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/libmain/shared.cc b/src/libmain/shared.cc index 029b457b1..77c497237 100644 --- a/src/libmain/shared.cc +++ b/src/libmain/shared.cc @@ -196,20 +196,20 @@ LegacyArgs::LegacyArgs(const std::string & programName, .longName = "keep-failed", .shortName ='K', .description = "Keep temporary directories of failed builds.", - .handler = {&(bool&) settings.keepFailed, true}, + .handler = {[&]() { settings.keepFailed.override(true); }}, }); addFlag({ .longName = "keep-going", .shortName ='k', .description = "Keep going after a build fails.", - .handler = {&(bool&) settings.keepGoing, true}, + .handler = {[&]() { settings.keepGoing.override(true); }}, }); addFlag({ .longName = "fallback", .description = "Build from source if substitution fails.", - .handler = {&(bool&) settings.tryFallback, true}, + .handler = {[&]() { settings.tryFallback.override(true); }}, }); auto intSettingAlias = [&](char shortName, const std::string & longName, @@ -247,7 +247,7 @@ LegacyArgs::LegacyArgs(const std::string & programName, .longName = "store", .description = "The URL of the Nix store to use.", .labels = {"store-uri"}, - .handler = {&(std::string&) settings.storeUri}, + .handler = {[&](std::string storeUri) { settings.storeUri.override(storeUri); }}, }); } |