• Rufflewind's avatar
    Windows: Improve terminal detection mechanism · 3dbd2b09
    Rufflewind authored
    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: 847d2293).
    
    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
    3dbd2b09
ghc.cabal.in 13.5 KB