diff options
| -rw-r--r-- | src/Propellor/CmdLine.hs | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/src/Propellor/CmdLine.hs b/src/Propellor/CmdLine.hs index 293bf3a2..8591395d 100644 --- a/src/Propellor/CmdLine.hs +++ b/src/Propellor/CmdLine.hs @@ -325,10 +325,14 @@ gitPush hin hout = void $ fromstdin `concurrently` tostdout connect fromh toh = do b <- B.hGetSome fromh 40960 hPutStrLn stderr $ show ("from", fromh, "to", toh, b) - unless (B.null b) $ do - B.hPut toh b - hFlush toh - connect fromh toh + if B.null b + then do + hClose fromh + hClose toh + else do + B.hPut toh b + hFlush toh + connect fromh toh hasOrigin :: IO Bool hasOrigin = do |
