aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/utils.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/utils.c b/src/utils.c
index 7e6bf6ec..6abe6237 100644
--- a/src/utils.c
+++ b/src/utils.c
@@ -51,6 +51,8 @@ void progress_bar(int val, int total, const char *text)
char s[1024];
const int width = 50;
+ if ( !isatty(stderr) ) return;
+
frac = (double)val/total;
n = (int)(frac*width);