From 532d73d5d86c3d25d08a8d771a189708dac323e2 Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Mon, 13 Mar 2017 14:07:58 +0100 Subject: BinaryCacheStore: Implement getBuildLog() We assume that build logs are stored under log/, 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 --- src/libstore/local-fs-store.cc | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'src/libstore/local-fs-store.cc') diff --git a/src/libstore/local-fs-store.cc b/src/libstore/local-fs-store.cc index c5da73dba36c..002ee4a65ce2 100644 --- a/src/libstore/local-fs-store.cc +++ b/src/libstore/local-fs-store.cc @@ -95,7 +95,11 @@ std::shared_ptr 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; } -- cgit 1.4.1