Skip to content

Commit

Permalink
Fix BinaryCacheStore::registerDrvOutput
Browse files Browse the repository at this point in the history
Was crashing because coercing a json document into a string is only
valid if the json is a string, otherwise we need to call `.dump()`
  • Loading branch information
thufschmitt committed Dec 16, 2020
1 parent e3ddffb commit 962b82e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/libstore/binary-cache-store.cc
Expand Up @@ -460,7 +460,7 @@ std::optional<const Realisation> BinaryCacheStore::queryRealisation(const DrvOut

void BinaryCacheStore::registerDrvOutput(const Realisation& info) {
auto filePath = realisationsPrefix + "/" + info.id.to_string() + ".doi";
upsertFile(filePath, info.toJSON(), "application/json");
upsertFile(filePath, info.toJSON().dump(), "application/json");
}

ref<FSAccessor> BinaryCacheStore::getFSAccessor()
Expand Down

0 comments on commit 962b82e

Please sign in to comment.