diff options
| author | Joey Hess <joey@kitenet.net> | 2014-11-18 15:53:15 -0400 |
|---|---|---|
| committer | Joey Hess <joey@kitenet.net> | 2014-11-18 15:53:15 -0400 |
| commit | 7956fda7d528356d5aa81c2cbf402e83fde39e82 (patch) | |
| tree | 246ab9a1fa25c293475e04c55cf4aae84779fb53 /src/Propellor | |
| parent | 0db5080d490d7cdf9859ddab9096ab11b3175c39 (diff) | |
get handles right way roung
Diffstat (limited to 'src/Propellor')
| -rw-r--r-- | src/Propellor/CmdLine.hs | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/Propellor/CmdLine.hs b/src/Propellor/CmdLine.hs index 9b0d755d..a41314f5 100644 --- a/src/Propellor/CmdLine.hs +++ b/src/Propellor/CmdLine.hs @@ -310,16 +310,16 @@ boot = do warningMessage "git pull from client failed" -- Shim for git push over the propellor ssh channel. --- Reads from stdin and sends it to the first fd; --- reads from the second fd and sends it to stdout. +-- Reads from stdin and sends it to hout; +-- reads from hin and sends it to stdout. gitPush :: Fd -> Fd -> IO () gitPush hin hout = void $ fromstdin `concurrently` tostdout where fromstdin = do - h <- fdToHandle hin + h <- fdToHandle hout B.getContents >>= B.hPut h tostdout = do - h <- fdToHandle hout + h <- fdToHandle hin B.hGetContents h >>= B.putStr hasOrigin :: IO Bool |
