diff options
author | Phil Ruffwind <rf@rufflewind.com> | 2016-12-09 10:28:25 -0500 |
---|---|---|
committer | Ben Gamari <ben@smart-cactus.org> | 2016-12-09 10:28:39 -0500 |
commit | cee72d5c3c53863bd4fc9f324a93c322448e038e (patch) | |
tree | 8d3713b912f28fc3dc6a5122a2c655cf1caf5640 /compiler/main/DynFlags.hs | |
parent | d3b546b1a6058f26d5659c7f2000a7b25b7ea2ba (diff) | |
download | haskell-cee72d5c3c53863bd4fc9f324a93c322448e038e.tar.gz |
Disable colors unless printing to stderr
Only print colors when mkLocMessageAnn is called directly from
defaultLogAction. This prevents ANSI error codes from cluttering up the
dump files.
Test Plan: validate
Reviewers: austin, bgamari
Reviewed By: bgamari
Subscribers: thomie
Differential Revision: https://phabricator.haskell.org/D2792
GHC Trac Issues: #12927
Diffstat (limited to 'compiler/main/DynFlags.hs')
-rw-r--r-- | compiler/main/DynFlags.hs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/main/DynFlags.hs b/compiler/main/DynFlags.hs index d7cde29557..d9ffa82bce 100644 --- a/compiler/main/DynFlags.hs +++ b/compiler/main/DynFlags.hs @@ -1791,7 +1791,7 @@ defaultLogAction dflags reason severity srcSpan style msg SevInfo -> printErrs msg style SevFatal -> printErrs msg style _ -> do hPutChar stderr '\n' - printErrs message style + printErrs message (setStyleColoured True style) -- careful (#2302): printErrs prints in UTF-8, -- whereas converting to string first and using -- hPutStr would just emit the low 8 bits of |