1
0
Fork 0
mirror of https://github.com/NixOS/nix synced 2025-06-29 02:11:15 +02:00

Convert Settings to the new config system

This makes all config options self-documenting.

Unknown or unparseable config settings and --option flags now cause a
warning.
This commit is contained in:
Eelco Dolstra 2017-04-13 20:53:23 +02:00
parent 6bd9576aeb
commit ba9ad29fdb
No known key found for this signature in database
GPG key ID: 8170B4726D7198DE
18 changed files with 348 additions and 546 deletions

View file

@ -22,7 +22,11 @@ MixCommonArgs::MixCommonArgs(const string & programName)
[](Strings ss) {
auto name = ss.front(); ss.pop_front();
auto value = ss.front();
settings.set(name, value);
try {
settings.set(name, value);
} catch (UsageError & e) {
warn(e.what());
}
});
}