Skip to content

Commit

Permalink
Add assert
Browse files Browse the repository at this point in the history
(cherry picked from commit d2f4d07)
  • Loading branch information
edolstra committed Oct 14, 2024
1 parent 339236d commit 1294442
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/libfetchers/tarball.cc
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,7 @@ DownloadFileResult downloadFile(
/* Cache metadata for all URLs in the redirect chain. */
for (auto & url : res.urls) {
key.second.insert_or_assign("url", url);
assert(!res.urls.empty());
infoAttrs.insert_or_assign("url", *res.urls.rbegin());
getCache()->upsert(key, *store, infoAttrs, *storePath);
}
Expand Down

0 comments on commit 1294442

Please sign in to comment.