diff options
author | Alois Wohlschlager <alois1@gmx-topmail.de> | 2024-09-02 20:09:35 +0200 |
---|---|---|
committer | Alois Wohlschlager <alois1@gmx-topmail.de> | 2024-10-15 19:55:50 +0200 |
commit | 4dbbd721eb9db75d4968a624b8cb9e75e979a144 (patch) | |
tree | ceee38ee4fc2acc806c124c65a8824f7db52e5c5 /src/libmain | |
parent | f6077314fa6aff862758095bb55fe844e9162a1d (diff) |
treewide: consistently mark overridden settings as such
Only overridden settings are sent to the daemon, and we're going to do the same
for the build hook to. It needs to be ensured that overridden settings are in
fact consistently marked as such, so that they actually get sent.
Change-Id: I7cd58d925702f86cf2c35ad121eb191ceb62a355
Diffstat (limited to 'src/libmain')
-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); }}, }); } |