mirror of
https://github.com/privatevoid-net/nix-super.git
synced 2024-11-22 05:56:15 +02:00
Move loadConfFile() to initLibStore
Part of an effort to make it easier to initialize the right things, by moving code into the appropriate libraries. Using libstore without loading the config file is risky, as sqlite may then be misconfigured. See https://github.com/cachix/cachix/issues/475
This commit is contained in:
parent
6e0b7109ab
commit
a692c43729
3 changed files with 3 additions and 3 deletions
|
@ -27,7 +27,6 @@ static ref<Store> store()
|
|||
if (!_store) {
|
||||
try {
|
||||
initLibStore();
|
||||
loadConfFile();
|
||||
settings.lockCPU = false;
|
||||
_store = openStore();
|
||||
} catch (Error & e) {
|
||||
|
|
|
@ -166,8 +166,6 @@ void initNix()
|
|||
if (sodium_init() == -1)
|
||||
throw Error("could not initialise libsodium");
|
||||
|
||||
loadConfFile();
|
||||
|
||||
startSignalHandlerThread();
|
||||
|
||||
/* Reset SIGCHLD to its default. */
|
||||
|
|
|
@ -291,6 +291,9 @@ void assertLibStoreInitialized() {
|
|||
}
|
||||
|
||||
void initLibStore() {
|
||||
|
||||
loadConfFile();
|
||||
|
||||
initLibStoreDone = true;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue