aboutsummaryrefslogtreecommitdiff
path: root/src/libstore/globals.cc
diff options
context:
space:
mode:
authorRobert Hensing <robert@roberthensing.nl>2023-02-01 16:46:26 +0100
committerRobert Hensing <robert@roberthensing.nl>2023-04-07 16:24:18 +0200
commita692c437298ad59004583f193ef3d73a378fd837 (patch)
treec6c9af6fcc5a859b0cf2db5d42b332072df6cbc3 /src/libstore/globals.cc
parent6e0b7109abb40ded327b15599b29f861d9acb3c9 (diff)
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
Diffstat (limited to 'src/libstore/globals.cc')
-rw-r--r--src/libstore/globals.cc3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/libstore/globals.cc b/src/libstore/globals.cc
index 823b4af74..b18525dd7 100644
--- a/src/libstore/globals.cc
+++ b/src/libstore/globals.cc
@@ -291,6 +291,9 @@ void assertLibStoreInitialized() {
}
void initLibStore() {
+
+ loadConfFile();
+
initLibStoreDone = true;
}