summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/Propellor/CmdLine.hs13
1 files changed, 10 insertions, 3 deletions
diff --git a/src/Propellor/CmdLine.hs b/src/Propellor/CmdLine.hs
index ea2fadad..f8d5d57d 100644
--- a/src/Propellor/CmdLine.hs
+++ b/src/Propellor/CmdLine.hs
@@ -12,7 +12,7 @@ import Control.Exception (bracket)
import System.Posix.IO
import Data.Time.Clock.POSIX
import Control.Concurrent.Async
-import qualified Data.ByteString.Lazy as B
+import qualified Data.ByteString as B
import System.Process (std_in, std_out)
import Propellor
@@ -317,10 +317,17 @@ gitPush hin hout = void $ fromstdin `concurrently` tostdout
where
fromstdin = do
h <- fdToHandle hout
- B.getContents >>= B.hPut h
+ connect stdin h
tostdout = do
h <- fdToHandle hin
- B.hGetContents h >>= B.putStr
+ connect h stdout
+ connect fromh toh = do
+ b <- B.hGetSome fromh 40960
+ unless (B.null b) $ do
+ hPutStrLn stderr $ show ("got", fromh, b)
+ B.hPut toh b
+ hFlush toh
+ connect fromh toh
hasOrigin :: IO Bool
hasOrigin = do