mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
<rdar://problem/13698402> Use raw_ostream::has_colors rather than is_displayed
to determine whether we should display colors. Swift SVN r4832
This commit is contained in:
@@ -407,8 +407,8 @@ public:
|
||||
REPLInput(REPLEnvironment &env)
|
||||
: StackTrace(*this), Env(env), Autoindent(true)
|
||||
{
|
||||
// Only show colors if both stderr and stdout are displayed.
|
||||
ShowColors = llvm::errs().is_displayed() && llvm::outs().is_displayed();
|
||||
// Only show colors if both stderr and stdout have colors.
|
||||
ShowColors = llvm::errs().has_colors() && llvm::outs().has_colors();
|
||||
|
||||
// Make sure the terminal color gets restored when the REPL is quit.
|
||||
if (ShowColors)
|
||||
|
||||
Reference in New Issue
Block a user