From 51492566184b4f98106de0e8199c8962dace567e Mon Sep 17 00:00:00 2001 From: Michael Sloan Date: Wed, 23 Mar 2016 16:30:38 -0700 Subject: [PATCH] Use lenient UTF-8 decode for build output #1945 --- src/Stack/Build/Execute.hs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Stack/Build/Execute.hs b/src/Stack/Build/Execute.hs index 00be2ead9d..60784895ba 100644 --- a/src/Stack/Build/Execute.hs +++ b/src/Stack/Build/Execute.hs @@ -861,7 +861,7 @@ withSingleContext runInBase ActionContext {..} ExecuteEnv {..} task@Task {..} md liftIO $ hClose h runResourceT $ CB.sourceFile (toFilePath logFile) - =$= CT.decodeUtf8 + =$= CT.decodeUtf8Lenient $$ mungeBuildOutput stripTHLoading makeAbsolute pkgDir =$ CL.consume throwM $ CabalExitedUnsuccessfully @@ -880,7 +880,7 @@ withSingleContext runInBase ActionContext {..} ExecuteEnv {..} task@Task {..} md (outputSink False LevelWarn) (outputSink stripTHLoading LevelInfo) outputSink excludeTH level = - CT.decodeUtf8 + CT.decodeUtf8Lenient =$ mungeBuildOutput excludeTH makeAbsolute pkgDir =$ CL.mapM_ (runInBase . monadLoggerLog $(TH.location >>= liftLoc) "" level) -- If users want control, we should add a config option for this