From 812fcbadae72960d200286355c9aaecfbe350bf2 Mon Sep 17 00:00:00 2001 From: Alexander Foremny Date: Wed, 20 Dec 2023 02:35:38 +0100 Subject: chore: parameterize `sh`'s output --- app/IssueEvent.hs | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'app/IssueEvent.hs') diff --git a/app/IssueEvent.hs b/app/IssueEvent.hs index 0c641ad..28bbae1 100644 --- a/app/IssueEvent.hs +++ b/app/IssueEvent.hs @@ -10,8 +10,6 @@ import Data.Binary (Binary (..)) import Data.Function ((&)) import Data.Text qualified as T import Data.Text.IO qualified as T -import Data.Text.Lazy qualified as LT -import Data.Text.Lazy.Encoding qualified as LT import GHC.Generics (Generic) import GHC.Records (HasField (..)) import Git.CommitHash (CommitHash) @@ -52,7 +50,7 @@ diff old new = withSystemTempDirectory "diff" $ \tmp -> do let cwd = tmp T.writeFile (tmp "old") old T.writeFile (tmp "new") new - A.parse . LT.toStrict . LT.decodeUtf8 <$> sh ("git diff --no-index -- old new || :" & setWorkingDir cwd) + A.parse <$> sh ("git diff --no-index -- old new || :" & setWorkingDir cwd) instance P.Render IssueEvent where render = P.render . P.Detailed -- cgit v1.2.3