Skip to content

Commit bd25cd0

Browse files
authored
Set the streams to utf8 in Main.hs (#466)
1 parent df63fd7 commit bd25cd0

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

exe/Main.hs

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

0 commit comments

Comments
 (0)