1
0
Fork 0
mirror of https://github.com/NixOS/nix synced 2025-06-26 07:31:15 +02:00

BinaryCacheStore: Implement addBuildLog()

This commit is contained in:
Eelco Dolstra 2022-01-18 16:14:01 +01:00
parent 4dda1f92aa
commit 5b243a2b4b
3 changed files with 14 additions and 0 deletions

View file

@ -512,4 +512,14 @@ std::optional<std::string> BinaryCacheStore::getBuildLog(const StorePath & path)
return getFile(logPath);
}
void BinaryCacheStore::addBuildLog(const StorePath & drvPath, std::string_view log)
{
assert(drvPath.isDerivation());
upsertFile(
"log/" + std::string(drvPath.to_string()),
(std::string) log, // FIXME: don't copy
"text/plain; charset=utf-8");
}
}