diff options
author | Eelco Dolstra <edolstra@gmail.com> | 2022-11-30 13:46:33 +0100 |
---|---|---|
committer | Eelco Dolstra <edolstra@gmail.com> | 2022-11-30 13:46:33 +0100 |
commit | 0b092bd87f35e463fea66ddd40639e7b260680a0 (patch) | |
tree | d76deb2455fe8ac9e02be76554168ef96446d0af | |
parent | 0596bdf3a9a42e73c68584da1401781a0e888f09 (diff) |
nix store make-content-addressed: Fix JSON construction
Fixes
error: [json.exception.type_error.301] cannot create object from initializer list
in tests/fetchClosure.sh.
-rw-r--r-- | src/nix/make-content-addressed.cc | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/nix/make-content-addressed.cc b/src/nix/make-content-addressed.cc index f2e4cefbe..f236bebd6 100644 --- a/src/nix/make-content-addressed.cc +++ b/src/nix/make-content-addressed.cc @@ -43,7 +43,7 @@ struct CmdMakeContentAddressed : virtual CopyCommand, virtual StorePathsCommand, assert(i != remappings.end()); jsonRewrites[srcStore->printStorePath(path)] = srcStore->printStorePath(i->second); } - std::cout << json::object({"rewrites", jsonRewrites}).dump(); + std::cout << nlohmann::json{"rewrites", jsonRewrites}.dump(); } else { for (auto & path : storePaths) { auto i = remappings.find(path); |