[commit: ghc] master: Windows: Improve terminal detection mechanism (3dbd2b0)
git at git.haskell.org
git at git.haskell.org
Sun Dec 18 01:02:01 UTC 2016
Repository : ssh://git@git.haskell.org/ghc
On branch : master
Link : http://ghc.haskell.org/trac/ghc/changeset/3dbd2b097aeb9217f4a7fc87e610e6983ebbce7b/ghc
>---------------------------------------------------------------
commit 3dbd2b097aeb9217f4a7fc87e610e6983ebbce7b
Author: Phil Ruffwind <rf at rufflewind.com>
Date: Sat Dec 17 18:07:49 2016 -0500
Windows: Improve terminal detection mechanism
The previous detection mechanism allowed environment variables (ANSICON,
ConEmuANSI, TERM) to supersede the fact that the stderr is not a
terminal, which is probably what led to color codes appearing in the
stderr of the tests (see: 847d229346431483b99adcff12e46c7bf6af15da).
This commit changes the detection mechanism to detect Cygwin/MSYS2
terminals in a more reliable manner, avoiding the use of environment
variables entirely.
Test Plan: validate
Reviewers: Phyx, austin, erikd, bgamari
Reviewed By: Phyx, bgamari
Subscribers: RyanGlScott, thomie
Differential Revision: https://phabricator.haskell.org/D2809
>---------------------------------------------------------------
3dbd2b097aeb9217f4a7fc87e610e6983ebbce7b
compiler/ghc.cabal.in | 1 +
compiler/ghc.mk | 1 +
compiler/main/DynFlags.hs | 100 +------------------------
compiler/main/SysTools/Terminal.hs | 150 +++++++++++++++++++++++++++++++++++++
4 files changed, 154 insertions(+), 98 deletions(-)
Diff suppressed because of size. To see it, use:
git diff-tree --root --patch-with-stat --no-color --find-copies-harder --ignore-space-at-eol --cc 3dbd2b097aeb9217f4a7fc87e610e6983ebbce7b
More information about the ghc-commits
mailing list