Merge branch 'mn/sideband-no-ansi' into maint
Tools that read diagnostic output in our standard error stream do not want to see terminal control sequence (e.g. erase-to-eol). Detect them by checking if the standard error stream is connected to a tty. * mn/sideband-no-ansi: sideband.c: do not use ANSI control sequence on non-terminal
This commit is contained in:
commit
73505ef7a5
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user