aboutsummaryrefslogtreecommitdiff
path: root/src/libmain
diff options
context:
space:
mode:
authorEelco Dolstra <edolstra@gmail.com>2021-01-27 12:06:03 +0100
committerEelco Dolstra <edolstra@gmail.com>2021-01-27 12:06:03 +0100
commit8e758d402ba1045c7b8273f8cb1d6d8d917ca52b (patch)
tree04c5bc22912b684a41cd4cfdd5c895127ce339a4 /src/libmain
parentf15f0b8e83051cd95dacb2784b004c8272957f30 (diff)
Remove mkFlag()
Diffstat (limited to 'src/libmain')
-rw-r--r--src/libmain/shared.cc14
1 files changed, 10 insertions, 4 deletions
diff --git a/src/libmain/shared.cc b/src/libmain/shared.cc
index 7e27e95c2..5baaff3e9 100644
--- a/src/libmain/shared.cc
+++ b/src/libmain/shared.cc
@@ -229,11 +229,17 @@ LegacyArgs::LegacyArgs(const std::string & programName,
intSettingAlias(0, "max-silent-time", "Number of seconds of silence before a build is killed.", "max-silent-time");
intSettingAlias(0, "timeout", "Number of seconds before a build is killed.", "timeout");
- mkFlag(0, "readonly-mode", "Do not write to the Nix store.",
- &settings.readOnlyMode);
+ addFlag({
+ .longName = "readonly-mode",
+ .description = "Do not write to the Nix store.",
+ .handler = {&settings.readOnlyMode, true},
+ });
- mkFlag(0, "no-gc-warning", "Disable warnings about not using `--add-root`.",
- &gcWarning, false);
+ addFlag({
+ .longName = "no-gc-warning",
+ .description = "Disable warnings about not using `--add-root`.",
+ .handler = {&gcWarning, true},
+ });
addFlag({
.longName = "store",