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:
@ -30,7 +30,7 @@ int recv_sideband(const char *me, int in_stream, int out)
|
|||||||
|
|
||||||
memcpy(buf, PREFIX, pf);
|
memcpy(buf, PREFIX, pf);
|
||||||
term = getenv("TERM");
|
term = getenv("TERM");
|
||||||
if (term && strcmp(term, "dumb"))
|
if (isatty(2) && term && strcmp(term, "dumb"))
|
||||||
suffix = ANSI_SUFFIX;
|
suffix = ANSI_SUFFIX;
|
||||||
else
|
else
|
||||||
suffix = DUMB_SUFFIX;
|
suffix = DUMB_SUFFIX;
|
||||||
|
Reference in New Issue
Block a user