Fix crashes due to utf8 decoding errors
This commit is contained in:
parent
8a0236a350
commit
5382fd9aca
@ -43,6 +43,7 @@ import System.Posix.Types
|
|||||||
import qualified Control.Exception as EX
|
import qualified Control.Exception as EX
|
||||||
import qualified Data.Text as T
|
import qualified Data.Text as T
|
||||||
import qualified Data.Text.Encoding as E
|
import qualified Data.Text.Encoding as E
|
||||||
|
import qualified Data.Text.Encoding.Error as E
|
||||||
import qualified System.Posix.Process.ByteString
|
import qualified System.Posix.Process.ByteString
|
||||||
as SPPB
|
as SPPB
|
||||||
import Streamly.External.Posix.DirStream
|
import Streamly.External.Posix.DirStream
|
||||||
@ -202,7 +203,7 @@ execLogged exe spath args lfile chdir env = do
|
|||||||
. T.pack
|
. T.pack
|
||||||
. color Blue
|
. color Blue
|
||||||
. T.unpack
|
. T.unpack
|
||||||
. E.decodeUtf8
|
. E.decodeUtf8With E.lenientDecode
|
||||||
. trim w
|
. trim w
|
||||||
. (\b -> "[ " <> toFilePath lfile <> " ] " <> b)
|
. (\b -> "[ " <> toFilePath lfile <> " ] " <> b)
|
||||||
$ bs
|
$ bs
|
||||||
|
Loading…
Reference in New Issue
Block a user