mirror of
https://github.com/NixOS/nix
synced 2025-06-30 19:57:59 +02:00
BinaryCacheStore: Implement getBuildLog()
We assume that build logs are stored under log/<drv>, e.g. /nix/store/q7ab198v13p0f8x8wgnd75dva7d5mip6-friday-devil-0.1.1.1.drv maps to https://cache.nixos.org/log/q7ab198v13p0f8x8wgnd75dva7d5mip6-friday-devil-0.1.1.1.drv
This commit is contained in:
parent
5b86451f02
commit
532d73d5d8
3 changed files with 31 additions and 1 deletions
|
@ -95,7 +95,11 @@ std::shared_ptr<std::string> LocalFSStore::getBuildLog(const Path & path_)
|
|||
assertStorePath(path);
|
||||
|
||||
if (!isDerivation(path)) {
|
||||
path = queryPathInfo(path)->deriver;
|
||||
try {
|
||||
path = queryPathInfo(path)->deriver;
|
||||
} catch (InvalidPath &) {
|
||||
return nullptr;
|
||||
}
|
||||
if (path == "") return nullptr;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue