diff options
author | Robert Hensing <robert@roberthensing.nl> | 2022-12-19 14:06:07 +0100 |
---|---|---|
committer | Robert Hensing <robert@roberthensing.nl> | 2022-12-24 14:39:30 +0100 |
commit | aba6eb348e0ed8177da1e7f1df46ba00d20eab96 (patch) | |
tree | 50bb1337cafac6b3a1389d43fd033d97a13c09f9 /src/libstore/globals.hh | |
parent | 26c7602c390f8c511f326785b570918b2f468892 (diff) |
libstore: Make sure that initNix has been called
Prevent bugs like https://github.com/cachix/cachix/pull/477
Diffstat (limited to 'src/libstore/globals.hh')
-rw-r--r-- | src/libstore/globals.hh | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/libstore/globals.hh b/src/libstore/globals.hh index 274a15dd7..22458efcf 100644 --- a/src/libstore/globals.hh +++ b/src/libstore/globals.hh @@ -984,4 +984,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(); + } |