on master help sign in
make sure git does not print to stdout or stderr during publish
commit306d33960f8d36c1bfa80e11826b580d70b02ea4 authorEvan Czaplicki <evancz@users.noreply.github.com> dateFri 12 Jul 2019, 16:09 (7 years ago) parent7b6e571
1 file changed+15−2
terminal/src/Publish.hs+15−2
terminal/src/Publish.hs+15−2
@@ -198,8 +198,21 @@ getGit :: Task.Task Exit.Publish Git
198198getGit =
199199 do maybeGit <- Task.io $ Dir.findExecutable "git"
200200 case maybeGit of
201− Just git -> return (Git (Process.rawSystem git))
202− Nothing -> Task.throw Exit.PublishNoGit
201+ Nothing ->
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
203216
204217
205218