aboutsummaryrefslogtreecommitdiff
path: root/src/nix/make-content-addressed.cc
diff options
context:
space:
mode:
authorEelco Dolstra <edolstra@gmail.com>2022-11-30 13:46:33 +0100
committerEelco Dolstra <edolstra@gmail.com>2022-11-30 13:46:33 +0100
commit0b092bd87f35e463fea66ddd40639e7b260680a0 (patch)
treed76deb2455fe8ac9e02be76554168ef96446d0af /src/nix/make-content-addressed.cc
parent0596bdf3a9a42e73c68584da1401781a0e888f09 (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.
Diffstat (limited to 'src/nix/make-content-addressed.cc')
-rw-r--r--src/nix/make-content-addressed.cc2
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);