Set the streams to utf8 in Main.hs (#466)

This commit is contained in:
Moritz Kiefer 2020-03-05 15:34:24 +01:00 committed by GitHub
parent df63fd76c0
commit bd25cd01ac
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -101,6 +101,10 @@ main = do
initialise caps (cradleRules >> mainRule >> pluginRules plugins >> action kick)
getLspId event (logger minBound) debouncer options vfs
else do
-- GHC produces messages with UTF8 in them, so make sure the terminal doesn't error
hSetEncoding stdout utf8
hSetEncoding stderr utf8
putStrLn $ "Ghcide setup tester in " ++ dir ++ "."
putStrLn "Report bugs at https://github.com/digital-asset/ghcide/issues"