1
1
Fork 0
mirror of https://github.com/NixOS/nix.git synced 2025-12-04 16:10:59 +01:00

Backport netrc-file option to 1.11

This commit is contained in:
Shea Levy 2017-03-03 16:41:56 -05:00
parent 13fe83dc8e
commit 37bdb9d7f2
4 changed files with 33 additions and 0 deletions

View file

@ -114,6 +114,10 @@ struct Curl
curl_easy_setopt(curl, CURLOPT_PROGRESSFUNCTION, progressCallback_);
curl_easy_setopt(curl, CURLOPT_PROGRESSDATA, (void *) &curl);
curl_easy_setopt(curl, CURLOPT_NOPROGRESS, 0);
/* If no file exist in the specified path, curl continues to work
* anyway as if netrc support was disabled. */
curl_easy_setopt(curl, CURLOPT_NETRC_FILE, settings.netrcFile.c_str());
curl_easy_setopt(curl, CURLOPT_NETRC, CURL_NETRC_OPTIONAL);
}
~Curl()