1
1
Fork 0
mirror of https://github.com/NixOS/nix.git synced 2025-11-21 17:59:36 +01:00

Merge pull request #7478 from hercules-ci/make-sure-initNix-called

libstore: Make sure that initNix has been called
This commit is contained in:
Théophane Hufschmitt 2023-01-02 14:12:49 +01:00 committed by GitHub
commit fb8fc6fda6
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 25 additions and 0 deletions

View file

@ -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();
}