on master help sign in
make sure git does not print to stdout or stderr during publish
306d339Evan Czaplicki
terminal/src/Publish.hs+15−2
@@ -198,8 +198,21 @@ getGit :: Task.Task Exit.Publish Git
198getGit =
198getGit =
199 do maybeGit <- Task.io $ Dir.findExecutable "git"
199 do maybeGit <- Task.io $ Dir.findExecutable "git"
200 case maybeGit of
200 case maybeGit of
201− Just git -> return (Git (Process.rawSystem git))
201+ Nothing ->
202− Nothing -> Task.throw Exit.PublishNoGit
202+ Task.throw Exit.PublishNoGit
203+
204+ Just git ->
205+ return $ Git $ \args ->
206+ let
207+ process =
208+ (Process.proc git args)
209+ { Process.std_in = Process.CreatePipe
210+ , Process.std_out = Process.CreatePipe
211+ , Process.std_err = Process.CreatePipe
212+ }
213+ in
214+ Process.withCreateProcess process $ \_ _ _ handle ->
215+ Process.waitForProcess handle
203
216
204
217
205
218