From 2ca292a2b470bfbea621790e1fd6f2aa7350bac0 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Tue, 18 Nov 2014 15:32:53 -0400 Subject: hook up handles --- src/Propellor/CmdLine.hs | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/Propellor/CmdLine.hs b/src/Propellor/CmdLine.hs index df739e18..62fd68f6 100644 --- a/src/Propellor/CmdLine.hs +++ b/src/Propellor/CmdLine.hs @@ -13,6 +13,7 @@ import System.Posix.IO import Data.Time.Clock.POSIX import Control.Concurrent.Async import qualified Data.ByteString as B +import System.Process (std_in, std_out) import Propellor import Propellor.Protocol @@ -212,7 +213,11 @@ spin hn hst = do loop Just NeedGitPush -> do sendMarked toh gitPushMarker "" - unlessM (boolSystem "git" [Param "upload-pack", Param "."]) $ + let p = (proc "git" ["upload-pack", "."]) + { std_in = UseHandle fromh + , std_out = UseHandle toh } + (Nothing, Nothing, Nothing, h) <- createProcess p + unlessM ((==) ExitSuccess <$> waitForProcess h) $ warningMessage "git send-pack failed" -- no more protocol possible after -- git push -- cgit v1.2.3