hook up handles

This commit is contained in:
Joey Hess 2014-11-18 15:32:53 -04:00
parent ced8d5959b
commit 2ca292a2b4
1 changed files with 6 additions and 1 deletions

View File

@ -13,6 +13,7 @@ import System.Posix.IO
import Data.Time.Clock.POSIX import Data.Time.Clock.POSIX
import Control.Concurrent.Async import Control.Concurrent.Async
import qualified Data.ByteString as B import qualified Data.ByteString as B
import System.Process (std_in, std_out)
import Propellor import Propellor
import Propellor.Protocol import Propellor.Protocol
@ -212,7 +213,11 @@ spin hn hst = do
loop loop
Just NeedGitPush -> do Just NeedGitPush -> do
sendMarked toh gitPushMarker "" 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" warningMessage "git send-pack failed"
-- no more protocol possible after -- no more protocol possible after
-- git push -- git push