Refactor downloadCached() interface

(cherry picked from commit df3f5a78d5)
This commit is contained in:
Eelco Dolstra
2019-06-24 22:12:26 +02:00
parent 7b9c68766d
commit f8b30338ac
6 changed files with 63 additions and 49 deletions
+3 -1
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, "" };