Show progress indicator for builtin fetchurl

This commit is contained in:
Eelco Dolstra 2015-10-21 15:03:29 +02:00
parent 5db358d4d7
commit 01615b5f63
3 changed files with 7 additions and 4 deletions

View file

@ -114,8 +114,6 @@ struct Curl
curl_easy_setopt(curl, CURLOPT_PROGRESSFUNCTION, progressCallback_);
curl_easy_setopt(curl, CURLOPT_PROGRESSDATA, (void *) &curl);
curl_easy_setopt(curl, CURLOPT_NOPROGRESS, 0);
showProgress = isatty(STDERR_FILENO);
}
~Curl()
@ -126,6 +124,8 @@ struct Curl
bool fetch(const string & url, const DownloadOptions & options)
{
showProgress = options.forceProgress || isatty(STDERR_FILENO);
curl_easy_setopt(curl, CURLOPT_URL, url.c_str());
if (options.verifyTLS)