提交 ef5c8a91 编写于 作者: P Pino Toscano 提交者: Andrea Bolognani

tests: fix TTY check in virTestUseTerminalColors()

Since colors would be used when writing to stdout, then check that
stdout is a TTY, instead of stdin.

This avoids the usage of terminal color codes when the output is
directed to file.
上级 9324f67a
......@@ -92,7 +92,7 @@ bool virTestOOMActive(void)
static int virTestUseTerminalColors(void)
{
return isatty(STDIN_FILENO);
return isatty(STDOUT_FILENO);
}
static unsigned int
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册