diff options
Diffstat (limited to 'src/libstore/binary-cache-store.cc')
-rw-r--r-- | src/libstore/binary-cache-store.cc | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/libstore/binary-cache-store.cc b/src/libstore/binary-cache-store.cc index 11fa3cae27a5..76c0a1a891b8 100644 --- a/src/libstore/binary-cache-store.cc +++ b/src/libstore/binary-cache-store.cc @@ -218,7 +218,11 @@ void BinaryCacheStore::narFromPath(const Path & storePath, Sink & sink) auto info = queryPathInfo(storePath).cast<const NarInfo>(); auto source = sinkToSource([this, url{info->url}](Sink & sink) { - getFile(url, sink); + try { + getFile(url, sink); + } catch (NoSuchBinaryCacheFile & e) { + throw SubstituteGone(e.what()); + } }); stats.narRead++; |