diff options
author | Eelco Dolstra <eelco.dolstra@logicblox.com> | 2015-10-21T13·03+0200 |
---|---|---|
committer | Eelco Dolstra <eelco.dolstra@logicblox.com> | 2015-10-21T13·14+0200 |
commit | 01615b5f63ad26307a7e47a9b6508e5e779a1e83 (patch) | |
tree | ee76a7419a9e6c829ed3260947cfdc218c481034 /src/libstore/download.cc | |
parent | 5db358d4d78aea7204a8f22c5bf2a309267ee038 (diff) |
Show progress indicator for builtin fetchurl
Diffstat (limited to 'src/libstore/download.cc')
-rw-r--r-- | src/libstore/download.cc | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/libstore/download.cc b/src/libstore/download.cc index 8ef3ab3f0b62..94c13249d494 100644 --- a/src/libstore/download.cc +++ b/src/libstore/download.cc @@ -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) |