From 281b2d5a457b26b7d5a6a6d859bccaa1947d2be3 Mon Sep 17 00:00:00 2001 From: grantwey Date: Fri, 4 Oct 2013 18:16:47 -0400 Subject: [PATCH] filter out carriage returns --- src/Shelly.hs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Shelly.hs b/src/Shelly.hs index 3f5d37e..3b14580 100644 --- a/src/Shelly.hs +++ b/src/Shelly.hs @@ -1187,7 +1187,7 @@ readfile :: FilePath -> Sh Text readfile = absPath >=> \fp -> do trace $ "readfile " <> toTextIgnore fp readBinary fp >>= - return . TE.decodeUtf8With TE.lenientDecode + return . T.filter (/='\r') . TE.decodeUtf8With TE.lenientDecode -- | wraps ByteSting readFile readBinary :: FilePath -> Sh ByteString