about summary refs log tree commit diff
path: root/src/libstore/download.cc
diff options
context:
space:
mode:
authorEelco Dolstra <eelco.dolstra@logicblox.com>2015-10-21T13·03+0200
committerEelco Dolstra <eelco.dolstra@logicblox.com>2015-10-21T13·14+0200
commit01615b5f63ad26307a7e47a9b6508e5e779a1e83 (patch)
treeee76a7419a9e6c829ed3260947cfdc218c481034 /src/libstore/download.cc
parent5db358d4d78aea7204a8f22c5bf2a309267ee038 (diff)
Show progress indicator for builtin fetchurl
Diffstat (limited to 'src/libstore/download.cc')
-rw-r--r--src/libstore/download.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/libstore/download.cc b/src/libstore/download.cc
index 8ef3ab3f0b..94c13249d4 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)