mirror of
https://github.com/intel/llvm.git
synced 2026-01-16 21:55:39 +08:00
Check if a terminal supports colors on Windows properly
Summary: Previously we SetUseColor(true) wrongly when output was not a terminal so it broken some (not public) bots. Thanks for issue report, @stella.stamenova Reviewers: stella.stamenova, zturner Reviewed By: stella.stamenova Subscribers: abidh, lldb-commits, stella.stamenova Differential Revision: https://reviews.llvm.org/D51772 llvm-svn: 341746
This commit is contained in:
@@ -812,7 +812,6 @@ Debugger::Debugger(lldb::LogOutputCallback log_callback, void *baton)
|
||||
// Enabling use of ANSI color codes because LLDB is using them to highlight
|
||||
// text.
|
||||
llvm::sys::Process::UseANSIEscapeCodes(true);
|
||||
SetUseColor(true);
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
@@ -806,6 +806,9 @@ void File::CalculateInteractiveAndTerminal() {
|
||||
if (_isatty(fd)) {
|
||||
m_is_interactive = eLazyBoolYes;
|
||||
m_is_real_terminal = eLazyBoolYes;
|
||||
#if defined(ENABLE_VIRTUAL_TERMINAL_PROCESSING)
|
||||
m_supports_colors = eLazyBoolYes;
|
||||
#endif
|
||||
}
|
||||
#else
|
||||
if (isatty(fd)) {
|
||||
|
||||
Reference in New Issue
Block a user