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

Don't require --fallback to recover from disappeared binary cache NARs

This commit is contained in:
Eelco Dolstra 2018-06-05 16:04:41 +02:00
parent 691b7582c7
commit 4ac4f675df
No known key found for this signature in database
GPG key ID: 8170B4726D7198DE
4 changed files with 41 additions and 17 deletions

View file

@ -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++;