another place hGetBoth was used without a writer thread
This commit is contained in:
parent
cad8824852
commit
d35a8d85b5
1 changed files with 3 additions and 2 deletions
|
@ -9,6 +9,8 @@ module Git.Command where
|
||||||
|
|
||||||
import qualified Data.Text.Lazy as L
|
import qualified Data.Text.Lazy as L
|
||||||
import qualified Data.Text.Lazy.IO as L
|
import qualified Data.Text.Lazy.IO as L
|
||||||
|
import Control.Concurrent
|
||||||
|
import Control.Exception (finally)
|
||||||
|
|
||||||
import Common
|
import Common
|
||||||
import Git
|
import Git
|
||||||
|
@ -61,8 +63,7 @@ pipeWriteRead params s repo = assertLocal repo $ do
|
||||||
(p, from, to) <- hPipeBoth "git" (toCommand $ gitCommandLine params repo)
|
(p, from, to) <- hPipeBoth "git" (toCommand $ gitCommandLine params repo)
|
||||||
fileEncoding to
|
fileEncoding to
|
||||||
fileEncoding from
|
fileEncoding from
|
||||||
hPutStr to s
|
_ <- forkIO $ finally (hPutStr to s) (hClose to)
|
||||||
hClose to
|
|
||||||
c <- hGetContents from
|
c <- hGetContents from
|
||||||
return (p, c)
|
return (p, c)
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue