aboutsummaryrefslogtreecommitdiff
path: root/src/libstore/globals.hh
diff options
context:
space:
mode:
authorThéophane Hufschmitt <7226587+thufschmitt@users.noreply.github.com>2023-01-02 14:12:49 +0100
committerGitHub <noreply@github.com>2023-01-02 14:12:49 +0100
commitfb8fc6fda61b44fec161958531ab69934c5f2f4d (patch)
tree5745d4c8c878b97eb3481f198d563ddf52a38cb6 /src/libstore/globals.hh
parent226591494ac126847b45a7e07542926bedb99896 (diff)
parentaba6eb348e0ed8177da1e7f1df46ba00d20eab96 (diff)
Merge pull request #7478 from hercules-ci/make-sure-initNix-called
libstore: Make sure that initNix has been called
Diffstat (limited to 'src/libstore/globals.hh')
-rw-r--r--src/libstore/globals.hh8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/libstore/globals.hh b/src/libstore/globals.hh
index f4d53757c..f026c8808 100644
--- a/src/libstore/globals.hh
+++ b/src/libstore/globals.hh
@@ -987,4 +987,12 @@ std::vector<Path> getUserConfigFiles();
extern const std::string nixVersion;
+/* NB: This is not sufficient. You need to call initNix() */
+void initLibStore();
+
+/* It's important to initialize before doing _anything_, which is why we
+ call upon the programmer to handle this correctly. However, we only add
+ this in a key locations, so as not to litter the code. */
+void assertLibStoreInitialized();
+
}