mirror of
https://github.com/NixOS/nix
synced 2025-06-28 13:41:15 +02:00
parent
94f11d0a61
commit
dc29e9fb47
6 changed files with 29 additions and 12 deletions
|
@ -88,7 +88,7 @@ static void update(const StringSet & channelNames)
|
|||
// definition from a consistent location if the redirect changes mid-download.
|
||||
std::string effectiveUrl;
|
||||
auto dl = getDownloader();
|
||||
auto filename = dl->downloadCached(store, url, false, "", Hash(), &effectiveUrl, 0);
|
||||
auto filename = dl->downloadCached(store, url, false, "", Hash(), &effectiveUrl, 0).path;
|
||||
url = chomp(std::move(effectiveUrl));
|
||||
|
||||
// If the URL contains a version number, append it to the name
|
||||
|
@ -123,10 +123,10 @@ static void update(const StringSet & channelNames)
|
|||
// Download the channel tarball.
|
||||
auto fullURL = url + "/nixexprs.tar.xz";
|
||||
try {
|
||||
filename = dl->downloadCached(store, fullURL, false);
|
||||
filename = dl->downloadCached(store, fullURL, false).path;
|
||||
} catch (DownloadError & e) {
|
||||
fullURL = url + "/nixexprs.tar.bz2";
|
||||
filename = dl->downloadCached(store, fullURL, false);
|
||||
filename = dl->downloadCached(store, fullURL, false).path;
|
||||
}
|
||||
chomp(filename);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue