1
1
Fork 0
mirror of https://github.com/NixOS/nix.git synced 2025-11-13 05:56:03 +01:00

Refactor downloadCached() interface

This commit is contained in:
Eelco Dolstra 2019-05-22 23:36:29 +02:00
parent 66f1d7ee95
commit df3f5a78d5
7 changed files with 73 additions and 54 deletions

View file

@ -657,7 +657,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, "" };