1
1
Fork 0
mirror of https://github.com/NixOS/nix.git synced 2025-12-09 02:21:02 +01:00

init: Add flag to avoid loading configuration

This commit is contained in:
Robert Hensing 2024-04-19 23:41:56 +02:00
parent 8c4c2156bd
commit e05b58b060
6 changed files with 27 additions and 7 deletions

View file

@ -21,8 +21,9 @@ int handleExceptions(const std::string & programName, std::function<void()> fun)
/**
* Don't forget to call initPlugins() after settings are initialized!
* @param loadConfig Whether to load configuration from `nix.conf`, `NIX_CONFIG`, etc. May be disabled for unit tests.
*/
void initNix();
void initNix(bool loadConfig = true);
void parseCmdLine(int argc, char * * argv,
std::function<bool(Strings::iterator & arg, const Strings::iterator & end)> parseArg);