Skip to content

Commit e6667db

Browse files
committed
Remove duplication between branches
1 parent 2404906 commit e6667db

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

src/System/Process/Typed.hs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -257,8 +257,7 @@ startProcess pConfig'@ProcessConfig {..} = liftIO $ do
257257
-- then call waitForProcess ourselves
258258
Left _ -> do
259259
eres <- try $ P.terminateProcess pHandle
260-
ec <-
261-
case eres of
260+
case eres of
262261
Left e
263262
-- On Windows, with the single-threaded runtime, it
264263
-- seems that if a process has already exited, the
@@ -272,9 +271,10 @@ startProcess pConfig'@ProcessConfig {..} = liftIO $ do
272271
-- Recommendation: always use the multi-threaded
273272
-- runtime!
274273
| isPermissionError e && not multiThreadedRuntime && isWindows ->
275-
P.waitForProcess pHandle
276-
| otherwise -> throwIO e >> P.waitForProcess pHandle
277-
Right () -> P.waitForProcess pHandle
274+
pure ()
275+
| otherwise -> throwIO e
276+
Right () -> pure ()
277+
ec <- P.waitForProcess pHandle
278278
success <- atomically $ tryPutTMVar pExitCode ec
279279
evaluate $ assert success ()
280280

0 commit comments

Comments
 (0)