mirror of
https://github.com/NixOS/nix
synced 2025-06-27 04:21:16 +02:00
* Allow options from the Nix config file to be overriden from the
command line (e.g. "--option build-use-chroot true").
This commit is contained in:
parent
8ab6bc5a49
commit
60cb7de336
3 changed files with 21 additions and 0 deletions
|
@ -243,6 +243,13 @@ static void initAndRun(int argc, char * * argv)
|
|||
maxSilentTime = getIntArg(arg, i, args.end());
|
||||
else if (arg == "--no-build-hook")
|
||||
useBuildHook = false;
|
||||
else if (arg == "--option") {
|
||||
++i; if (i == args.end()) throw UsageError("`--option' requires two arguments");
|
||||
string name = *i;
|
||||
++i; if (i == args.end()) throw UsageError("`--option' requires two arguments");
|
||||
string value = *i;
|
||||
overrideSetting(name, tokenizeString(value));
|
||||
}
|
||||
else remaining.push_back(arg);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue