diff options
author | Eelco Dolstra <edolstra@gmail.com> | 2021-05-10 11:14:45 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-05-10 11:14:45 +0200 |
commit | 2bb49fb6d0ec8aca629dbf4dfe216c13c324fc75 (patch) | |
tree | 2c03d0462ab6518e0279887f031984bbb5c75758 /src | |
parent | db6ab75caec3ea4f575d7a01a28fd1fd7bc28892 (diff) | |
parent | 2f63cc02de5e319708157f2b56f69581106e59b8 (diff) |
Merge pull request #4786 from matthewbauer/mkdir-local-share-nix
Create parent for trusted list path before writing
Diffstat (limited to 'src')
-rw-r--r-- | src/libexpr/flake/config.cc | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/libexpr/flake/config.cc b/src/libexpr/flake/config.cc index 63566131e..c8a5a319f 100644 --- a/src/libexpr/flake/config.cc +++ b/src/libexpr/flake/config.cc @@ -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() |