Merge branch 'na/no-http-test-in-the-middle' into maint
[gitweb.git] / sideband.c
index d1125f5c528b680f915bb2fbf54231cc8c3b2ec0..7f9dc229fbc82d005b5c2b417c2af2fc9f6b497a 100644 (file)
@@ -30,7 +30,7 @@ int recv_sideband(const char *me, int in_stream, int out)
 
        memcpy(buf, PREFIX, pf);
        term = getenv("TERM");
-       if (term && strcmp(term, "dumb"))
+       if (isatty(2) && term && strcmp(term, "dumb"))
                suffix = ANSI_SUFFIX;
        else
                suffix = DUMB_SUFFIX;