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:
parent
7b9c68766d
commit
f8b30338ac
6 changed files with 63 additions and 49 deletions
|
@ -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, "" };
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue