diff options
author | Eelco Dolstra <edolstra@gmail.com> | 2019-02-25 23:23:45 +0800 |
---|---|---|
committer | Eelco Dolstra <edolstra@gmail.com> | 2019-02-25 23:23:45 +0800 |
commit | d342de02b9f7ee07f22e1986af8d5c8eb325d8ba (patch) | |
tree | 95bd39afff3f5d15aef3fa195fb96d359074383d /src/libexpr | |
parent | 529add316c5356a8060c35f987643b7bf5c796dc (diff) |
fetchFlake: Use infinite TTL when the revision is specified
Diffstat (limited to 'src/libexpr')
-rw-r--r-- | src/libexpr/primops/flake.cc | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/libexpr/primops/flake.cc b/src/libexpr/primops/flake.cc index f9a1a3d6a..3998f9ef9 100644 --- a/src/libexpr/primops/flake.cc +++ b/src/libexpr/primops/flake.cc @@ -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); |