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:
parent
691b7582c7
commit
4ac4f675df
4 changed files with 41 additions and 17 deletions
|
@ -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++;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue