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

Refactor downloadCached() interface

(cherry picked from commit df3f5a78d5)
This commit is contained in:
Eelco Dolstra 2019-05-22 23:36:29 +02:00
parent 7b9c68766d
commit f8b30338ac
No known key found for this signature in database
GPG key ID: 8170B4726D7198DE
6 changed files with 63 additions and 49 deletions

View file

@ -677,7 +677,9 @@ std::pair<bool, std::string> EvalState::resolveSearchPathElem(const SearchPathEl
if (isUri(elem.second)) {
try {
res = { true, getDownloader()->downloadCached(store, elem.second, true).path };
CachedDownloadRequest request(elem.second);
request.unpack = true;
res = { true, getDownloader()->downloadCached(store, request).path };
} catch (DownloadError & e) {
printError(format("warning: Nix search path entry '%1%' cannot be downloaded, ignoring") % elem.second);
res = { false, "" };