1
0
Fork 0
mirror of https://github.com/NixOS/nix synced 2025-06-28 17:51:15 +02:00

Improve binary cache fallback test

This commit is contained in:
Eelco Dolstra 2018-06-05 14:44:26 +02:00
parent a2ec7a3bfd
commit ca06a9cea7
No known key found for this signature in database
GPG key ID: 8170B4726D7198DE
2 changed files with 12 additions and 7 deletions

View file

@ -574,6 +574,11 @@ struct CurlDownloader : public Downloader
void enqueueItem(std::shared_ptr<DownloadItem> item)
{
if (item->request.data
&& !hasPrefix(item->request.uri, "http://")
&& !hasPrefix(item->request.uri, "https://"))
throw nix::Error("uploading to '%s' is not supported", item->request.uri);
{
auto state(state_.lock());
if (state->quit)