diff options
author | Joey Hess <joeyh@joeyh.name> | 2015-09-09 17:02:00 -0400 |
---|---|---|
committer | Joey Hess <joeyh@joeyh.name> | 2015-09-09 17:02:00 -0400 |
commit | 09b050b24597a21343f712e4bc7b6f8660113d63 (patch) | |
tree | 508942f546882679c2f34648350f3579303eb856 /Messages.hs | |
parent | eee2566fce1e3cf8337ced753a8dcfc2923b28b2 (diff) |
fsck: Work around bug in persistent that broke display of problematically encoded filenames on stderr when using --incremental.
Diffstat (limited to 'Messages.hs')
-rw-r--r-- | Messages.hs | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/Messages.hs b/Messages.hs index 026fca51e..fce5c179a 100644 --- a/Messages.hs +++ b/Messages.hs @@ -30,6 +30,7 @@ module Messages ( showHeader, showRaw, setupConsole, + setConsoleEncoding, enableDebugOutput, disableDebugOutput, debugEnabled, @@ -176,9 +177,12 @@ setupConsole = do <$> streamHandler stderr DEBUG <*> pure preciseLogFormatter updateGlobalLogger rootLoggerName (setLevel NOTICE . setHandlers [s]) - {- This avoids ghc's output layer crashing on - - invalid encoded characters in - - filenames when printing them out. -} + setConsoleEncoding + +{- This avoids ghc's output layer crashing on invalid encoded characters in + - filenames when printing them out. -} +setConsoleEncoding :: IO () +setConsoleEncoding = do fileEncoding stdout fileEncoding stderr |