Merge pull request #4786 from matthewbauer/mkdir-local-share-nix

Create parent for trusted list path before writing
This commit is contained in:
Eelco Dolstra 2021-05-10 11:14:45 +02:00 committed by GitHub
commit 2bb49fb6d0
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -22,7 +22,9 @@ static TrustedList readTrustedList()
static void writeTrustedList(const TrustedList & trustedList)
{
writeFile(trustedListPath(), nlohmann::json(trustedList).dump());
auto path = trustedListPath();
createDirs(dirOf(path));
writeFile(path, nlohmann::json(trustedList).dump());
}
void ConfigFile::apply()