fetchFlake: Use infinite TTL when the revision is specified

This commit is contained in:
Eelco Dolstra 2019-02-25 23:23:45 +08:00
parent 529add316c
commit d342de02b9
No known key found for this signature in database
GPG key ID: 8170B4726D7198DE

View file

@ -113,7 +113,8 @@ static FlakeSourceInfo fetchFlake(EvalState & state, const FlakeRef & flakeRef)
? *refData->ref
: "master");
auto result = getDownloader()->downloadCached(state.store, url, true, "source");
auto result = getDownloader()->downloadCached(state.store, url, true, "source",
Hash(), nullptr, refData->rev ? 1000000000 : settings.tarballTtl);
if (!result.etag)
throw Error("did not receive an ETag header from '%s'", url);