Skip to content

Commit 5ad7085

Browse files
committed
Defer modifying the code page till after arg parsing (fixes #755)
1 parent 5cae2db commit 5ad7085

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/main/Main.hs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ fixCodePage = id
127127

128128
-- | Commandline dispatcher.
129129
main :: IO ()
130-
main = withInterpreterArgs stackProgName $ \args isInterpreter -> fixCodePage $ do
130+
main = withInterpreterArgs stackProgName $ \args isInterpreter -> do
131131
-- Line buffer the output by default, particularly for non-terminal runs.
132132
-- See https://github.com/commercialhaskell/stack/pull/360
133133
hSetBuffering stdout LineBuffering
@@ -325,7 +325,7 @@ main = withInterpreterArgs stackProgName $ \args isInterpreter -> fixCodePage $
325325
throwIO exitCode
326326
Right (global,run) -> do
327327
when (globalLogLevel global == LevelDebug) $ putStrLn versionString'
328-
run global `catch` \e -> do
328+
fixCodePage $ run global `catch` \e -> do
329329
-- This special handler stops "stack: " from being printed before the
330330
-- exception
331331
case fromException e of

0 commit comments

Comments
 (0)