Show progress indicator for builtin fetchurl
This commit is contained in:
parent
5db358d4d7
commit
01615b5f63
3 changed files with 7 additions and 4 deletions
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue