summaryrefslogtreecommitdiff
path: root/apt-private
diff options
context:
space:
mode:
authorMichael Vogt <mvo@debian.org>2014-02-05 17:35:33 +0100
committerMichael Vogt <mvo@debian.org>2014-02-05 17:35:33 +0100
commit33b813ce44c7bafeb2a36b66fd004f8d94a2cbe4 (patch)
treea78f7197e287fafa81927305f17f8df698e17639 /apt-private
parent4afa7d18b37661996d188959ba7917824e1545d3 (diff)
move isatty() check into InitOutput()
Diffstat (limited to 'apt-private')
-rw-r--r--apt-private/private-output.cc3
1 files changed, 3 insertions, 0 deletions
diff --git a/apt-private/private-output.cc b/apt-private/private-output.cc
index 2ae112af4..420ca14d5 100644
--- a/apt-private/private-output.cc
+++ b/apt-private/private-output.cc
@@ -30,6 +30,9 @@ unsigned int ScreenWidth = 80 - 1; /* - 1 for the cursor */
bool InitOutput() /*{{{*/
{
+ if (!isatty(STDOUT_FILENO) && _config->FindI("quiet", -1) == -1)
+ _config->Set("quiet","1");
+
c0out.rdbuf(cout.rdbuf());
c1out.rdbuf(cout.rdbuf());
c2out.rdbuf(cout.rdbuf());